Enlightenment CVS committal Author : sebastid Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: Ecore_X.h ecore_x_icccm.c ecore_x_window_prop.c Log Message: One step closer to deprecating ecore_x_window_prop.c =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/Ecore_X.h,v retrieving revision 1.113 retrieving revision 1.114 diff -u -3 -r1.113 -r1.114 --- Ecore_X.h 28 Apr 2005 12:26:32 -0000 1.113 +++ Ecore_X.h 29 Apr 2005 08:48:03 -0000 1.114 @@ -1100,6 +1100,9 @@ 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); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_icccm.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ecore_x_icccm.c 27 Apr 2005 07:46:57 -0000 1.24 +++ ecore_x_icccm.c 29 Apr 2005 08:48:04 -0000 1.25 @@ -663,6 +663,36 @@ } /** + * 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 * @return The windows client machine string =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -3 -r1.63 -r1.64 --- ecore_x_window_prop.c 28 Apr 2005 06:50:11 -0000 1.63 +++ ecore_x_window_prop.c 29 Apr 2005 08:48:04 -0000 1.64 @@ -454,6 +454,7 @@ * * 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) ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs