include/floating.h File Reference

#include "tree.h"
Include dependency graph for floating.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DRAGGING_CB(name)
 Macro to create a callback function for dragging.

Typedefs

typedef void(* callback_t )(Con *, Rect *, uint32_t, uint32_t, void *)
 Callback for dragging.

Enumerations

enum  border_t { BORDER_LEFT = (1 << 0), BORDER_RIGHT = (1 << 1), BORDER_TOP = (1 << 2), BORDER_BOTTOM = (1 << 3) }
 

On which border was the dragging initiated?

More...

Functions

void floating_enable (Con *con, bool automatic)
 Enables floating mode for the given container by detaching it from its parent, creating a new container around it and storing this container in the floating_windows list of the workspace.
void floating_disable (Con *con, bool automatic)
 Disables floating mode for the given container by re-attaching the container to its old parent.
void toggle_floating_mode (Con *con, bool automatic)
 Calls floating_enable() for tiling containers and floating_disable() for floating containers.
void floating_raise_con (Con *con)
 Raises the given container in the list of floating containers.
bool floating_maybe_reassign_ws (Con *con)
 Checks if con’s coordinates are within its workspace and re-assigns it to the actual workspace if not.
void floating_drag_window (Con *con, xcb_button_press_event_t *event)
 Called when the user clicked on the titlebar of a floating window.
void floating_resize_window (Con *con, bool proportional, xcb_button_press_event_t *event)
 Called when the user clicked on a floating window while holding the floating_modifier and the right mouse button.
void drag_pointer (Con *con, xcb_button_press_event_t *event, xcb_window_t confine_to, border_t border, callback_t callback, void *extra)
 This function grabs your pointer and lets you drag stuff around (borders).

Define Documentation

#define DRAGGING_CB ( name   ) 
Value:
static void name(Con *con, Rect *old_rect, uint32_t new_x, \
                         uint32_t new_y, void *extra)

Macro to create a callback function for dragging.

Definition at line 20 of file floating.h.


Typedef Documentation

typedef void(* callback_t)(Con *, Rect *, uint32_t, uint32_t, void *)

Callback for dragging.

Definition at line 17 of file floating.h.


Enumeration Type Documentation

enum border_t

On which border was the dragging initiated?

Enumerator:
BORDER_LEFT 
BORDER_RIGHT 
BORDER_TOP 
BORDER_BOTTOM 

Definition at line 25 of file floating.h.


Function Documentation

void drag_pointer ( Con con,
xcb_button_press_event_t *  event,
xcb_window_t  confine_to,
border_t  border,
callback_t  callback,
void *  extra 
)

This function grabs your pointer and lets you drag stuff around (borders).

Every time you move your mouse, an XCB_MOTION_NOTIFY event will be received and the given callback will be called with the parameters specified (client, border on which the click originally was), the original rect of the client, the event and the new coordinates (x, y).

Definition at line 401 of file floating.c.

References conn, DLOG, ELOG, FREE, handle_event(), Con::rect, and root.

Referenced by floating_drag_window(), floating_resize_window(), and resize_graphical_handler().

Here is the call graph for this function:

void floating_disable ( Con con,
bool  automatic 
)

Disables floating mode for the given container by re-attaching the container to its old parent.

Definition at line 176 of file floating.c.

References con_descend_tiling_focused(), con_fix_percent(), con_focus(), con_get_workspace(), con_is_floating(), DONT_KILL_WINDOW, Con::floating, focused, LOG, Con::parent, Con::percent, TAILQ_INSERT_TAIL, TAILQ_REMOVE, tree_close(), and Con::type.

Referenced by toggle_floating_mode(), tree_move(), and yyparse().

Here is the call graph for this function:

void floating_drag_window ( Con con,
xcb_button_press_event_t *  event 
)

Called when the user clicked on the titlebar of a floating window.

Calls the drag_pointer function with the drag_window callback

Definition at line 297 of file floating.c.

References BORDER_TOP, DLOG, drag_pointer(), and tree_render().

Referenced by route_click().

Here is the call graph for this function:

void floating_enable ( Con con,
bool  automatic 
)
bool floating_maybe_reassign_ws ( Con con  ) 

Checks if con’s coordinates are within its workspace and re-assigns it to the actual workspace if not.

Definition at line 250 of file floating.c.

References xoutput::con, con_descend_focused(), con_focus(), con_get_output(), con_move_to_workspace(), DLOG, ELOG, get_output_containing(), Rect::height, Con::name, output_get_content(), Con::rect, TAILQ_FIRST, Rect::width, Rect::x, and Rect::y.

Referenced by DRAGGING_CB(), and floating_enable().

Here is the call graph for this function:

void floating_raise_con ( Con con  ) 

Raises the given container in the list of floating containers.

Definition at line 239 of file floating.c.

References DLOG, Con::name, Con::parent, TAILQ_INSERT_TAIL, and TAILQ_REMOVE.

Referenced by route_click().

void floating_resize_window ( Con con,
bool  proportional,
xcb_button_press_event_t *  event 
)

Called when the user clicked on a floating window while holding the floating_modifier and the right mouse button.

Calls the drag_pointer function with the resize_window callback

Definition at line 372 of file floating.c.

References BORDER_BOTTOM, BORDER_LEFT, BORDER_RIGHT, BORDER_TOP, resize_window_callback_params::corner, DLOG, drag_pointer(), Rect::height, Con::rect, and Rect::width.

Referenced by route_click().

Here is the call graph for this function:

void toggle_floating_mode ( Con con,
bool  automatic 
)

Calls floating_enable() for tiling containers and floating_disable() for floating containers.

If the automatic flag is set to true, this was an automatic update by a change of the window class from the application which can be overwritten by the user.

Definition at line 223 of file floating.c.

References con_is_floating(), floating_disable(), floating_enable(), and LOG.

Referenced by handle_transient_for(), and yyparse().

Here is the call graph for this function:


Generated on 7 Feb 2013 for i3 by  doxygen 1.6.1