1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 focus.h for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 See the COPYING file for a copy of the GNU General Public License.
30 /*! The client which is currently focused */
31 extern struct _ObClient
*focus_client
;
33 /*! The recent focus order on each desktop */
34 extern GList
*focus_order
;
36 void focus_startup(gboolean reconfig
);
37 void focus_shutdown(gboolean reconfig
);
39 /*! Specify which client is currently focused, this doesn't actually
40 send focus anywhere, its called by the Focus event handlers */
41 void focus_set_client(struct _ObClient
*client
);
43 /*! Focus nothing, but let keyboard events be caught. */
44 void focus_nothing(void);
46 /*! Call this when you need to focus something! */
47 struct _ObClient
* focus_fallback(gboolean allow_refocus
,
48 gboolean allow_pointer
,
49 gboolean allow_omnipresent
,
52 /*! Add a new client into the focus order */
53 void focus_order_add_new(struct _ObClient
*c
);
55 /*! Remove a client from the focus order */
56 void focus_order_remove(struct _ObClient
*c
);
58 /*! Move a client to the top of the focus order */
59 void focus_order_to_top(struct _ObClient
*c
);
61 /*! Move a client to where it would be if it was newly added to the focus order
63 void focus_order_like_new(struct _ObClient
*c
);
65 /*! Move a client to the bottom of the focus order (keeps iconic windows at the
66 very bottom always though). */
67 void focus_order_to_bottom(struct _ObClient
*c
);
69 struct _ObClient
*focus_order_find_first(guint desktop
);
71 gboolean
focus_valid_target(struct _ObClient
*ft
,
73 gboolean helper_windows
,
74 gboolean iconic_windows
,
75 gboolean all_desktops
,
76 gboolean nonhilite_windows
,
77 gboolean dock_windows
,
78 gboolean desktop_windows
,
79 gboolean user_request
);