i3/include/layout.h
Michael Stapelberg 818e02ef35 huge change: implement RandR instead of Xinerama
Thanks to Merovius for doing a proof of concept on this one and
being a driving force behind the idea.

Using RandR instead of Xinerama means that we are now able to use
the full potential of the modern way of configuring screens. That
means, i3 now has an idea of the outputs your graphic driver
provides, which allowed us to get rid of the ugly way of detecting
changes in the screen configuration which we used before. Now, your
workspaces should not be confused when changing output modes anymore.

Also, instead of having ugly heuristics to assign your workspaces
to (the screen at position X or the second screen in the list of
screens) you will be able to just specify an output name.

As this change basically touches everything, you should be prepared
for bugs. Please test and report them!
2010-03-02 12:47:21 +01:00

95 lines
2.8 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* vim:ts=8:expandtab
*
* i3 - an improved dynamic tiling window manager
*
* (c) 2009 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
*
*/
#include <xcb/xcb.h>
#ifndef _LAYOUT_H
#define _LAYOUT_H
/**
* Gets the unoccupied space (= space which is available for windows which
* were resized by the user) This is necessary to render both, customly
* resized windows and never touched windows correctly, meaning that the
* aspect ratio will be maintained when opening new windows.
*
*/
int get_unoccupied_x(Workspace *workspace);
/** See get_unoccupied_x */
int get_unoccupied_y(Workspace *workspace);
/**
* (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.
*
*/
void decorate_window(xcb_connection_t *conn, Client *client,
xcb_drawable_t drawable, xcb_gcontext_t gc,
int offset_x, int offset_y);
/**
* Redecorates the given client correctly by checking if its in a stacking
* container and re-rendering the stack window or just calling decorate_window
* if its not in a stacking container.
*
*/
void redecorate_window(xcb_connection_t *conn, Client *client);
/**
* Pushes the clients x and y coordinates to X11
*
*/
void reposition_client(xcb_connection_t *conn, Client *client);
/**
* Pushes the clients width/height to X11 and resizes the child window. This
* function also updates the clients position, so if you work on tiling clients
* only, you can use this function instead of separate calls to reposition_client
* and resize_client to reduce flickering.
*
*/
void resize_client(xcb_connection_t *conn, Client *client);
/**
* Renders the given container. Is called by render_layout() or individually
* (for example when focus changes in a stacking container)
*
*/
void render_container(xcb_connection_t *conn, Container *container);
/**
* 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 didnt enter the window actively at all.
*
*/
void ignore_enter_notify_forall(xcb_connection_t *conn, Workspace *workspace,
bool ignore_enter_notify);
/**
* Renders the given workspace on the given screen
*
*/
void render_workspace(xcb_connection_t *conn, Output *output, Workspace *r_ws);
/**
* 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 dont need to render *everything*, you should call render_container
* on the container you want to refresh.
*
*/
void render_layout(xcb_connection_t *conn);
#endif