2 * property.h - property handlers header
4 * Copyright © 2008-2009 Julien Danjou <julien@danjou.info>
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.
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.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef AWESOME_PROPERTY_H
23 #define AWESOME_PROPERTY_H
25 #include "objects/client.h"
27 #define PROPERTY(funcname) \
28 xcb_get_property_cookie_t property_get_##funcname(client_t *c); \
29 void property_update_##funcname(client_t *c, xcb_get_property_cookie_t cookie)
32 PROPERTY(net_wm_name
);
33 PROPERTY(wm_icon_name
);
34 PROPERTY(net_wm_icon_name
);
35 PROPERTY(wm_client_machine
);
36 PROPERTY(wm_window_role
);
37 PROPERTY(wm_transient_for
);
38 PROPERTY(wm_client_leader
);
39 PROPERTY(wm_normal_hints
);
42 PROPERTY(wm_protocols
);
44 PROPERTY(net_wm_icon
);
48 void property_handle_propertynotify(xcb_property_notify_event_t
*ev
);
49 int luaA_register_xproperty(lua_State
*L
);
50 int luaA_set_xproperty(lua_State
*L
);
51 int luaA_get_xproperty(lua_State
*L
);
61 /* CARDINAL with values 0 and 1 (or "0 and != 0") */
67 xproperty_cmp(const void *a
, const void *b
)
69 const xproperty_t
*x
= a
, *y
= b
;
70 return x
->atom
- y
->atom
;
73 BARRAY_FUNCS(xproperty_t
, xproperty
, DO_NOTHING
, xproperty_cmp
)
76 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80