edelib  2.1.0
Netwm.h
1 /*
2  * $Id: Netwm.h 3533 2013-03-04 23:20:19Z karijes $
3  *
4  * Functions for easier communication with window manager
5  * Copyright (c) 2009 edelib authors
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library 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 GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __EDELIB_NETWM_H__
22 #define __EDELIB_NETWM_H__
23 
24 #include "edelib-global.h"
25 #include <FL/Fl_Image.H>
26 #include <FL/x.H>
27 
28 #include "List.h"
29 
30 EDELIB_NS_BEGIN
31 
40 enum {
51 };
52 
58 enum {
73 };
74 
84 };
85 
105 };
106 
115 };
116 
117 
122 typedef void (*NetwmCallback)(int action, Window xid, void *data);
123 
133 void netwm_callback_add(NetwmCallback cb, void *data = 0);
134 
140 
145 bool netwm_workarea_get_size(int& x, int& y, int& w, int &h);
146 
151 int netwm_workspace_get_count(void);
152 
157 void netwm_workspace_change(int n);
158 
164 
170 int netwm_workspace_get_names(char**& names);
171 
176 void netwm_workspace_free_names(char** names);
177 
183 void netwm_window_set_type(Window win, int t);
184 
190 
195 void netwm_window_set_strut(Window win, int left, int right, int top, int bottom);
196 
205 void netwm_window_set_strut_partial(Window win, int sizes[12]);
206 
212 
218 
223 int netwm_window_get_all_mapped(Window **windows);
224 
230 
237 
242 char *netwm_window_get_title(Window win);
243 
250 Fl_RGB_Image *netwm_window_get_icon(Window win, unsigned int requested_width = 0);
251 
257 
263 void netwm_window_set_active(Window win, int source = 0);
264 
269 void netwm_window_maximize(Window win) EDELIB_DEPRECATED;
270 
275 void netwm_window_close(Window win);
276 
281 void wm_window_ede_restore(Window win);
282 
289 
295 
301 
307 
312 void wm_window_set_state(Window win, WmStateValue state);
313 
314 EDELIB_NS_END
315 #endif