One step closer to deprecating ecore_x_window_prop.c

SVN revision: 14482
This commit is contained in:
sebastid 2005-04-29 08:48:04 +00:00 committed by sebastid
parent 7b09a9a77b
commit cd97600ce3
3 changed files with 34 additions and 0 deletions

View File

@ -1100,6 +1100,9 @@ EAPI int ecore_x_icccm_protocol_isset(Ecore_X_Window win,
EAPI void ecore_x_icccm_name_class_set(Ecore_X_Window win,
const char *n,
const char *c);
EAPI void ecore_x_icccm_name_class_get(Ecore_X_Window win,
char **n,
char **c);
EAPI char *ecore_x_icccm_client_machine_get(Ecore_X_Window win);
EAPI void ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv);
EAPI void ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv);

View File

@ -662,6 +662,36 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c)
XFree(xch);
}
/**
* Get a window name & class.
* @param win The window
* @param n The name string
* @param c The class string
*
* Get a window name * class
*/
void
ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c)
{
XClassHint xch;
if (n) *n = NULL;
if (c) *c = NULL;
if (XGetClassHint(_ecore_x_disp, win, &xch))
{
if (n)
{
if (xch.res_name) *n = strdup(xch.res_name);
}
if (c)
{
if (xch.res_class) *c = strdup(xch.res_class);
}
XFree(xch.res_name);
XFree(xch.res_class);
}
}
/**
* Get a window client machine string.
* @param win The window

View File

@ -454,6 +454,7 @@ ecore_x_window_prop_name_class_set(Ecore_X_Window win, const char *n, const char
*
* Get a windows name and class property. strings must be free'd when done
* with.
* DEPRECATED. Please use ecore_x_icccm_name_class_get() instead.
*/
void
ecore_x_window_prop_name_class_get(Ecore_X_Window win, char **n, char **c)