openbox/cwmcc/prop.h

46 lines
1.7 KiB
C
Raw Normal View History

#ifndef __cwmcc_prop_h
#define __cwmcc_prop_h
2003-04-09 21:24:58 +00:00
#include <glib.h>
2003-04-09 21:24:58 +00:00
#include <X11/Xlib.h>
/* with the exception of prop_get32, all other prop_get_* functions require
you to free the returned value with g_free or g_strfreev (for the char**s)
*/
2003-04-09 21:24:58 +00:00
gboolean cwmcc_prop_get32(Window win, Atom prop, Atom type, gulong *ret);
2003-04-09 21:24:58 +00:00
gboolean cwmcc_prop_get_array32(Window win, Atom prop, Atom type, gulong **ret,
gulong *nret);
2003-04-09 21:24:58 +00:00
gboolean cwmcc_prop_get_string(Window win, Atom prop, Atom type, char **ret);
2003-04-09 21:24:58 +00:00
/*! Gets a string from a property which is stored in UTF-8 encoding. */
gboolean cwmcc_prop_get_string_utf8(Window win, Atom prop, char **ret);
2003-04-09 21:24:58 +00:00
/*! Gets a string from a property which is stored in the current local
encoding. The returned string is in UTF-8 encoding. */
gboolean cwmcc_prop_get_string_locale(Window win, Atom prop, char **ret);
2003-04-09 21:24:58 +00:00
/*! Gets a null terminated array of strings from a property which is stored in
UTF-8 encoding. */
gboolean cwmcc_prop_get_strings_utf8(Window win, Atom prop, char ***ret);
2003-04-09 21:24:58 +00:00
/*! Gets a null terminated array of strings from a property which is stored in
the current locale encoding. The returned string is in UTF-8 encoding. */
gboolean cwmcc_prop_get_strings_locale(Window win, Atom prop, char ***ret);
void cwmcc_prop_set32(Window win, Atom prop, Atom type, gulong val);
void cwmcc_prop_set_array32(Window win, Atom prop, Atom type,
gulong *val, gulong num);
void cwmcc_prop_set_string_utf8(Window win, Atom prop, char *val);
2003-04-09 21:24:58 +00:00
/*! Sets a null terminated array of strings in a property encoded as UTF-8. */
void cwmcc_prop_set_strings_utf8(Window win, Atom prop, char **strs);
2003-04-09 21:24:58 +00:00
void cwmcc_prop_erase(Window win, Atom prop);
2003-04-09 21:24:58 +00:00
#endif