]> Dogcows Code - chaz/openbox/blob - openbox/focus.h
dont crash when flashing a window when it goes away, remove the timer when dying
[chaz/openbox] / openbox / focus.h
1 #ifndef __focus_h
2 #define __focus_h
3
4 #include "misc.h"
5
6 #include <X11/Xlib.h>
7 #include <glib.h>
8
9 struct _ObClient;
10
11 /*! The client which is currently focused */
12 extern struct _ObClient *focus_client;
13
14 /*! The recent focus order on each desktop */
15 extern GList **focus_order;
16
17 void focus_startup();
18 void focus_shutdown();
19
20 /*! Specify which client is currently focused, this doesn't actually
21 send focus anywhere, its called by the Focus event handlers */
22 void focus_set_client(struct _ObClient *client);
23
24 typedef enum {
25 OB_FOCUS_FALLBACK_DESKTOP, /*!< switching desktops */
26 OB_FOCUS_FALLBACK_UNFOCUSING, /*!< forcefully remove focus from the
27 current window */
28 OB_FOCUS_FALLBACK_NOFOCUS /*!< nothing has focus for some reason */
29 } ObFocusFallbackType;
30
31 /*! Call this when you need to focus something! */
32 void focus_fallback(ObFocusFallbackType type);
33
34 /*! Cycle focus amongst windows
35 Returns the _ObClient to which focus has been cycled, or NULL if none. */
36 void focus_cycle(gboolean forward, gboolean linear,
37 gboolean dialog, gboolean done, gboolean cancel);
38 void focus_directional_cycle(ObDirection dir,
39 gboolean dialog, gboolean done, gboolean cancel);
40
41 /*! Add a new client into the focus order */
42 void focus_order_add_new(struct _ObClient *c);
43
44 /*! Remove a client from the focus order */
45 void focus_order_remove(struct _ObClient *c);
46
47 /*! Move a client to the top of the focus order */
48 void focus_order_to_top(struct _ObClient *c);
49
50 /*! Move a client to the bottom of the focus order (keeps iconic windows at the
51 very bottom always though). */
52 void focus_order_to_bottom(struct _ObClient *c);
53
54 #endif
This page took 0.033723 seconds and 4 git commands to generate.