Enlightenment CVS committal Author : sebastid Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_border.h e_hints.c e_icon.c e_icon.h Log Message: _NET_WM_ICON, isn't finished. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.233 retrieving revision 1.234 diff -u -3 -r1.233 -r1.234 --- e_border.c 1 Jun 2005 07:35:56 -0000 1.233 +++ e_border.c 3 Jun 2005 06:43:23 -0000 1.234 @@ -351,6 +351,10 @@ bd->client.icccm.fetch.icon_name = 0; bd->client.netwm.fetch.icon_name = 1; } + else if (atoms[i] == ECORE_X_ATOM_NET_WM_ICON) + { + bd->client.netwm.fetch.icon = 1; + } } free(atoms); } @@ -1426,6 +1430,10 @@ e_object_del(E_OBJECT(bd)); } +void e_border_icon_add(E_Border *bd, Evas *e) +{ +} + void e_border_button_bindings_ungrab_all(void) { @@ -1930,6 +1938,13 @@ bd->client.icccm.fetch.window_role = 1; bd->changed = 1; } + /* + else if (e->atom == ECORE_X_ATOM_NET_WM_ICON) + { + bd->client.netwm.fetch.icon = 1; + bd->changed = 1; + } + */ return 1; } @@ -2928,6 +2943,39 @@ bd->client.netwm.fetch.icon_name = 0; } + /* + if (bd->client.netwm.fetch.icon) + { + if (bd->client.netwm.icon.data) free(bd->client.netwm.icon.data); + if (!ecore_x_netwm_icon_get(bd->client.win, + &bd->client.netwm.icon.width, &bd->client.netwm.icon.height, + &bd->client.netwm.icon.data, &bd->client.netwm.icon.size)) + printf("ERROR: Fetch icon from client\n"); + else + { + if (bd->icon_object) + { + evas_object_del(bd->icon_object); + bd->icon_object = NULL; + } + bd->icon_object = e_icon_add(bd->bg_evas); + e_icon_data_set(bd->icon_object, bd->client.netwm.icon.data, + bd->client.netwm.icon.width, bd->client.netwm.icon.height); + e_icon_alpha_set(bd->icon_object, 1); + + if (bd->bg_object) + { + evas_object_show(bd->icon_object); + edje_object_part_swallow(bd->bg_object, "icon_swallow", bd->icon_object); + } + else + { + evas_object_hide(bd->icon_object); + } + } + bd->client.netwm.fetch.icon = 0; + } + */ if (bd->client.icccm.fetch.machine) { if (bd->client.icccm.machine) free(bd->client.icccm.machine); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.h,v retrieving revision 1.63 retrieving revision 1.64 diff -u -3 -r1.63 -r1.64 --- e_border.h 31 May 2005 06:52:05 -0000 1.63 +++ e_border.h 3 Jun 2005 06:43:23 -0000 1.64 @@ -162,6 +162,12 @@ unsigned int desktop; char *name; char *icon_name; + struct { + unsigned int *data; + int width; + int height; + int size; + } icon; /* NetWM Window state */ struct { @@ -181,6 +187,8 @@ struct { unsigned char name : 1; + unsigned char icon_name : 1; + unsigned char icon : 1; /* No, fetch on new_client, shouldn't be changed after map. unsigned char pid : 1; */ @@ -190,7 +198,6 @@ /* No, fetch on new_client, shouldn't be changed after map. unsigned char type : 1; */ - unsigned char icon_name : 1; /* No, don't fetch state, update on client message unsigned char state : 1; */ @@ -401,6 +408,8 @@ EAPI void e_border_act_close_begin(E_Border *bd); EAPI void e_border_act_kill_begin(E_Border *bd); +EAPI void e_border_icon_add(E_Border *bd, Evas *e); + EAPI void e_border_button_bindings_ungrab_all(void); EAPI void e_border_button_bindings_grab_all(void); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_hints.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- e_hints.c 31 May 2005 06:52:05 -0000 1.40 +++ e_hints.c 3 Jun 2005 06:43:23 -0000 1.41 @@ -51,7 +51,12 @@ ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_VIRTUAL_ROOTS, 1); + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_ICON, 1); + + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_ICON_NAME, 1); + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_NAME, 1); + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_PID, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_STICKY, 1); @@ -63,6 +68,9 @@ ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_ABOVE, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_STATE_BELOW, 1); + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, 1); + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_VISIBLE_NAME, 1); + ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP, 1); ecore_x_netwm_supported(roots[i], ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK, 1); =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_icon.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- e_icon.c 7 Feb 2005 13:51:09 -0000 1.2 +++ e_icon.c 3 Jun 2005 06:43:23 -0000 1.3 @@ -82,6 +82,24 @@ } void +e_icon_alpha_set(Evas_Object *obj, int alpha) +{ + E_Smart_Data *sd; + + sd = evas_object_smart_data_get(obj); + evas_object_image_alpha_set(sd->obj, alpha); +} + +int +e_icon_alpha_get(Evas_Object *obj) +{ + E_Smart_Data *sd; + + sd = evas_object_smart_data_get(obj); + return evas_object_image_alpha_get(sd->obj); +} + +void e_icon_size_get(Evas_Object *obj, int *w, int *h) { E_Smart_Data *sd; @@ -112,6 +130,16 @@ _e_icon_smart_reconfigure(sd); } +void +e_icon_data_set(Evas_Object *obj, void *data, int w, int h) +{ + E_Smart_Data *sd; + + sd = evas_object_smart_data_get(obj); + evas_object_image_size_set(sd->obj, w, h); + evas_object_image_data_copy_set(sd->obj, data); +} + /* local subsystem globals */ static void _e_icon_smart_reconfigure(E_Smart_Data *sd) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_icon.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- e_icon.h 7 Feb 2005 13:51:09 -0000 1.4 +++ e_icon.h 3 Jun 2005 06:43:23 -0000 1.5 @@ -11,9 +11,12 @@ EAPI const char *e_icon_file_get (Evas_Object *obj); EAPI void e_icon_smooth_scale_set (Evas_Object *obj, int smooth); EAPI int e_icon_smooth_scale_get (Evas_Object *obj); +EAPI void e_icon_alpha_set (Evas_Object *obj, int smooth); +EAPI int e_icon_alpha_get (Evas_Object *obj); EAPI void e_icon_size_get (Evas_Object *obj, int *w, int *h); EAPI int e_icon_fill_inside_get (Evas_Object *obj); EAPI void e_icon_fill_inside_set (Evas_Object *obj, int fill_inside); +EAPI void e_icon_data_set (Evas_Object *obj, void *data, int w, int h); #endif #endif ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs