]> Dogcows Code - chaz/openbox/blob - openbox/focus.h
add a focus_hilite variable
[chaz/openbox] / openbox / focus.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3 focus.h for the Openbox window manager
4 Copyright (c) 2003 Ben Jansens
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 See the COPYING file for a copy of the GNU General Public License.
17 */
18
19 #ifndef __focus_h
20 #define __focus_h
21
22 #include "misc.h"
23
24 #include <X11/Xlib.h>
25 #include <glib.h>
26
27 struct _ObClient;
28
29 /*! The client which is currently focused */
30 extern struct _ObClient *focus_client;
31 /*! The client which is being decorated as focused, not always matching the
32 real focus, but this is used to track it so that it can be ersolved to match
33 */
34 extern struct _ObClient *focus_hilite;
35 /*! The client which appears focused during a focus cycle operation */
36 extern struct _ObClient *focus_cycle_target;
37
38 /*! The recent focus order on each desktop */
39 extern GList **focus_order;
40
41 void focus_startup(gboolean reconfig);
42 void focus_shutdown(gboolean reconfig);
43
44 /*! Specify which client is currently focused, this doesn't actually
45 send focus anywhere, its called by the Focus event handlers */
46 void focus_set_client(struct _ObClient *client);
47
48 typedef enum {
49 OB_FOCUS_FALLBACK_UNFOCUSING, /*!< forcefully remove focus from the
50 current window */
51 OB_FOCUS_FALLBACK_NOFOCUS /*!< nothing has focus for some reason */
52 } ObFocusFallbackType;
53
54 struct _ObClient* focus_fallback_target(ObFocusFallbackType type);
55
56 /*! Call this when you need to focus something! */
57 void focus_fallback(ObFocusFallbackType type);
58
59 /*! Cycle focus amongst windows. */
60 void focus_cycle(gboolean forward, gboolean linear,
61 gboolean dialog, gboolean done, gboolean cancel);
62 void focus_directional_cycle(ObDirection dir,
63 gboolean dialog, gboolean done, gboolean cancel);
64
65 /*! Add a new client into the focus order */
66 void focus_order_add_new(struct _ObClient *c);
67
68 /*! Remove a client from the focus order */
69 void focus_order_remove(struct _ObClient *c);
70
71 /*! Move a client to the top of the focus order */
72 void focus_order_to_top(struct _ObClient *c);
73
74 /*! Move a client to the bottom of the focus order (keeps iconic windows at the
75 very bottom always though). */
76 void focus_order_to_bottom(struct _ObClient *c);
77
78 #endif
This page took 0.040141 seconds and 4 git commands to generate.