2009-02-13 20:33:31 -05:00
|
|
|
|
/*
|
|
|
|
|
* vim:ts=8:expandtab
|
|
|
|
|
*
|
|
|
|
|
* i3 - an improved dynamic tiling window manager
|
|
|
|
|
*
|
|
|
|
|
* (c) 2009 Michael Stapelberg and contributors
|
|
|
|
|
*
|
|
|
|
|
* See file LICENSE for license information.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-02-13 13:04:45 -05:00
|
|
|
|
#include <xcb/xcb.h>
|
|
|
|
|
|
|
|
|
|
#ifndef _LAYOUT_H
|
|
|
|
|
#define _LAYOUT_H
|
|
|
|
|
|
2009-05-03 08:29:58 -04:00
|
|
|
|
/**
|
|
|
|
|
* Gets the unoccupied space (= space which is available for windows which were resized by the user)
|
2009-05-09 11:48:35 -04:00
|
|
|
|
* This is necessary to render both, customly resized windows and never touched
|
2009-05-03 08:29:58 -04:00
|
|
|
|
* windows correctly, meaning that the aspect ratio will be maintained when opening new windows.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-05-09 11:48:35 -04:00
|
|
|
|
int get_unoccupied_x(Workspace *workspace);
|
2009-05-03 08:29:58 -04:00
|
|
|
|
|
2009-04-07 13:02:07 -04:00
|
|
|
|
/**
|
|
|
|
|
* (Re-)draws window decorations for a given Client onto the given drawable/graphic context.
|
|
|
|
|
* When in stacking mode, the window decorations are drawn onto an own window.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-02-23 18:30:04 -05:00
|
|
|
|
void decorate_window(xcb_connection_t *conn, Client *client, xcb_drawable_t drawable, xcb_gcontext_t gc, int offset);
|
2009-04-07 13:02:07 -04:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Redecorates the given client correctly by checking if it’s in a stacking container and
|
|
|
|
|
* re-rendering the stack window or just calling decorate_window if it’s not in a stacking
|
|
|
|
|
* container.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-03-02 20:28:26 -05:00
|
|
|
|
void redecorate_window(xcb_connection_t *conn, Client *client);
|
2009-04-07 13:02:07 -04:00
|
|
|
|
|
2009-05-23 10:34:03 -04:00
|
|
|
|
/**
|
|
|
|
|
* Pushes the client’s x and y coordinates to X11
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
void reposition_client(xcb_connection_t *conn, Client *client);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Pushes the client’s width/height to X11 and resizes the child window
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
void resize_client(xcb_connection_t *conn, Client *client);
|
|
|
|
|
|
2009-04-07 13:02:07 -04:00
|
|
|
|
/**
|
|
|
|
|
* Renders the given container. Is called by render_layout() or individually (for example
|
|
|
|
|
* when focus changes in a stacking container)
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-03-04 09:45:12 -05:00
|
|
|
|
void render_container(xcb_connection_t *conn, Container *container);
|
2009-04-07 13:02:07 -04:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Modifies the event mask of all clients on the given workspace to either ignore or to handle
|
|
|
|
|
* enter notifies. It is handy to ignore notifies because they will be sent when a window is mapped
|
|
|
|
|
* under the cursor, thus when the user didn’t enter the window actively at all.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-03-10 19:20:56 -04:00
|
|
|
|
void ignore_enter_notify_forall(xcb_connection_t *conn, Workspace *workspace, bool ignore_enter_notify);
|
2009-04-07 13:02:07 -04:00
|
|
|
|
|
2009-05-09 07:01:23 -04:00
|
|
|
|
/**
|
|
|
|
|
* Renders the given workspace on the given screen
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
void render_workspace(xcb_connection_t *conn, i3Screen *screen, Workspace *r_ws);
|
|
|
|
|
|
2009-04-07 13:02:07 -04:00
|
|
|
|
/**
|
|
|
|
|
* Renders the whole layout, that is: Go through each screen, each workspace, each container
|
|
|
|
|
* and render each client. This also renders the bars.
|
|
|
|
|
*
|
|
|
|
|
* If you don’t need to render *everything*, you should call render_container on the container
|
|
|
|
|
* you want to refresh.
|
|
|
|
|
*
|
|
|
|
|
*/
|
2009-02-13 13:04:45 -05:00
|
|
|
|
void render_layout(xcb_connection_t *conn);
|
|
|
|
|
|
|
|
|
|
#endif
|