From: <enl...@li...> - 2004-04-10 20:50:27
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data Log Message: Directory /cvsroot/enlightenment/misc/engage/data added to the repository |
From: <enl...@li...> - 2004-04-10 20:50:27
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Log Message: Directory /cvsroot/enlightenment/misc/engage/src added to the repository |
From: <enl...@li...> - 2004-04-10 20:50:27
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/icons Log Message: Directory /cvsroot/enlightenment/misc/engage/data/icons added to the repository |
From: <enl...@li...> - 2004-04-10 20:50:27
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage Log Message: Directory /cvsroot/enlightenment/misc/engage added to the repository |
From: <enl...@li...> - 2004-04-10 21:01:08
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data Added Files: .cvsignore Makefile.am Log Message: Added the docker code from genneth to CVS, lots of work has been done - lots still to do ---------------------------------------------------------------------- |
From: <enl...@li...> - 2004-04-10 21:01:08
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage Added Files: .cvsignore AUTHORS COPYING COPYING-PLAIN ChangeLog INSTALL Makefile.am NEWS README TODO autogen.sh configure.in engageapplinks engagemappings Log Message: Added the docker code from genneth to CVS, lots of work has been done - lots still to do ---------------------------------------------------------------------- |
From: <enl...@li...> - 2004-04-10 21:01:09
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/icons Added Files: .cvsignore Makefile.am README calc.png firefox.png folder.png gimp.png lock.png sysmon.png term.png thunderbird.png trash.png vim.png xapp.png xmms.png Log Message: Added the docker code from genneth to CVS, lots of work has been done - lots still to do ---------------------------------------------------------------------- |
From: <enl...@li...> - 2004-04-10 21:01:09
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Added Files: .cvsignore Makefile.am config.c dock.c engage.h icon.c main.c userconfig.c window.c wm.c Log Message: Added the docker code from genneth to CVS, lots of work has been done - lots still to do ---------------------------------------------------------------------- |
From: <enl...@li...> - 2004-04-10 21:24:31
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Added Files: .indent.pro Log Message: Oops, forgot this |
From: <enl...@li...> - 2004-04-11 14:45:28
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage Modified Files: configure.in Log Message: Added 'below' mode for hugely faster response (but no windows shining through) set 'options.mode' to 1 to use this feature =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/configure.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- configure.in 10 Apr 2004 21:38:14 -0000 1.3 +++ configure.in 11 Apr 2004 14:31:50 -0000 1.4 @@ -79,6 +79,20 @@ AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [PACKAGE_LIB_DIR]) fi +PROG="esmart-config"; +AC_PATH_PROG(ESMART_CONFIG, $PROG, "", $PATH) +if [ test -z $ESMART_CONFIG ]; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for you shell as to how to extend your path."; + echo "FATAL ERROR. ABORT."; + exit -1; +fi +esmart_cflags=`$ESMART_CONFIG --cflags` +esmart_libs=`$ESMART_CONFIG --libs` +AC_SUBST(esmart_cflags) +AC_SUBST(esmart_libs) + + dnl Set PACKAGE_SOURCE_DIR in config.h. #packagesrcdir=`cd $srcdir && pwd` #AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "$packagesrcdir", [PACKAGE_SOURCE_DIR]]) @@ -93,6 +107,13 @@ AC_SUBST(ecore_cflags) AC_SUBST(ecore_libs) +have_esmart_trans="no" +dnl Make sure the esmart header/lib is available +AC_CHECK_HEADER( Esmart/Esmart_Trans.h, + [ AC_DEFINE(HAVE_TRANS_BG, [], [Esmart Pseudo-transparency support]) + have_esmart_trans="yes" + ]) + AC_OUTPUT([ Makefile src/Makefile |
From: <enl...@li...> - 2004-04-11 14:45:29
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: Makefile.am config.c dock.c engage.h window.c Log Message: Added 'below' mode for hugely faster response (but no windows shining through) set 'options.mode' to 1 to use this feature =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Makefile.am 10 Apr 2004 20:47:39 -0000 1.1 +++ Makefile.am 11 Apr 2004 14:31:51 -0000 1.2 @@ -5,7 +5,8 @@ -I/usr/local/include \ -I$(top_srcdir)/lib \ @evas_cflags@ \ -@ecore_cflags@ +@ecore_cflags@ \ +@esmart_cflags@ bin_PROGRAMS = engage @@ -19,5 +20,5 @@ userconfig.c -engage_LDADD = @evas_libs@ @ecore_libs@ +engage_LDADD = @evas_libs@ @ecore_libs@ @esmart_libs@ =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- config.c 10 Apr 2004 20:47:39 -0000 1.1 +++ config.c 11 Apr 2004 14:31:51 -0000 1.2 @@ -12,6 +12,7 @@ ecore_config_default_int("engage.options.width", 1024); ecore_config_default_int("engage.options.height", 100); options.icon_path = PACKAGE_DATA_DIR "/icons/"; + ecore_config_default_int_bound("engage.options.mode", OM_ONTOP, 0, 1, 1); ecore_config_default_int("engage.options.size", 32); ecore_config_default_int("engage.options.spacing", 4); @@ -30,6 +31,7 @@ ecore_config_load(); options.width = ecore_config_get_int("engage.options.width"); options.height = ecore_config_get_int("engage.options.height"); + options.mode = ecore_config_get_int("engage.options.mode"); options.size = ecore_config_get_int("engage.options.size"); options.spacing = ecore_config_get_int("engage.options.spacing"); =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/dock.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- dock.c 10 Apr 2004 20:47:39 -0000 1.1 +++ dock.c 11 Apr 2004 14:31:51 -0000 1.2 @@ -37,7 +37,10 @@ for (i = 0; i < 4; i++) { dock.background[i] = evas_object_image_add(evas); - evas_object_image_alpha_set(dock.background[i], 0); + if (options.mode == OM_ONTOP) + evas_object_image_alpha_set(dock.background[i], 0); + else + evas_object_image_alpha_set(dock.background[i], 1); evas_object_image_size_set(dock.background[i], 1, height); evas_object_image_smooth_scale_set(dock.background[i], 0); if (i != OD_BG_FILL) =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- engage.h 10 Apr 2004 20:47:39 -0000 1.1 +++ engage.h 11 Apr 2004 14:31:51 -0000 1.2 @@ -13,6 +13,11 @@ typedef struct _OD_Dock OD_Dock; typedef struct _OD_Icon OD_Icon; +typedef enum { + OM_ONTOP = 0, + OM_BELOW = 1 +} OD_Mode; + extern OD_Options options; extern OD_Dock dock; extern Evas_List *clients; @@ -61,6 +66,7 @@ struct _OD_Options { int width, height; char *icon_path; + OD_Mode mode; int size, spacing, arrow_size; // icon-* double zoomfactor, dock_zoom_duration; =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- window.c 10 Apr 2004 20:47:39 -0000 1.1 +++ window.c 11 Apr 2004 14:31:51 -0000 1.2 @@ -1,5 +1,8 @@ #include "engage.h" +#include "config.h" #include <Ecore_X.h> +#include <Esmart/Esmart_Trans.h> + #include <X11/Xatom.h> #include <X11/Xutil.h> #include <X11/Xlib.h> @@ -20,12 +23,13 @@ void od_window_init() { - // determine the desktop size Ecore_X_Display *dsp; Screen *scr; int def; double res_x, res_y; + Evas_Object *o; + // determine the desktop size dsp = ecore_x_display_get(); def = DefaultScreen(dsp); scr = ScreenOfDisplay(dsp, def); @@ -39,7 +43,10 @@ ecore_evas_title_set(ee, "Engage"); ecore_evas_name_class_set(ee, "engage", "engage"); ecore_evas_borderless_set(ee, 1); - ecore_evas_shaped_set(ee, 1); + if (options.mode == OM_ONTOP) + ecore_evas_shaped_set(ee, 1); + else + ecore_evas_shaped_set(ee, 0); ecore_evas_size_min_set(ee, options.width, options.height); ecore_evas_size_max_set(ee, options.width, options.height); ecore_evas_callback_pre_render_set(ee, od_dock_redraw); @@ -64,23 +71,36 @@ (int) (res_y - options.height)); //ecore_x_window_prop_window_type_dock_set(od_window); ecore_x_window_prop_sticky_set(od_window, 1); - ecore_x_window_prop_layer_set(od_window, ECORE_X_WINDOW_LAYER_ABOVE); + if (options.mode == OM_ONTOP) + ecore_x_window_prop_layer_set(od_window, ECORE_X_WINDOW_LAYER_ABOVE); + else + ecore_x_window_prop_layer_set(od_window, ECORE_X_WINDOW_LAYER_BELOW); ecore_x_window_prop_desktop_request(od_window, 4294967295L); ecore_evas_show(ee); - - Evas_Object *background = evas_object_image_add(evas); - - evas_object_image_size_set(background, (int) res_x, (int) res_y); - evas_object_image_data_update_add(background, 0, 0, (int) res_x, (int) res_y); - evas_object_image_fill_set(background, 0.0, 0.0, res_x, res_y); - evas_object_image_alpha_set(background, 1); - evas_object_resize(background, res_x, res_y); - evas_object_move(background, (options.width - res_x) / 2.0, - options.height - res_y); - evas_object_layer_set(background, -9998); - evas_object_show(background); - + +#ifdef HAVE_TRANS_BG + if (options.mode == OM_BELOW) { + o = esmart_trans_x11_new(evas); + evas_object_layer_set(o, 0); + evas_object_move(o, 0, 0); + evas_object_resize(o, options.width, options.height); + evas_object_name_set(o, "trans"); + + esmart_trans_x11_freshen(o, (int) ((res_x - options.width) / 2.0), + (int) (res_y - options.height), + options.width, options.height); + evas_object_show(o); + } +#else + o = evas_object_rectangle_add(evas); + evas_object_color_set(o, 0, 0, 0, 255); + evas_object_layer_set(o, 0); + evas_object_move(o, 0, 0); + evas_object_resize(o, options.width, options.height); + evas_object_name_set(o, "trans"); + evas_object_show(o); +#endif } static void |
From: <enl...@li...> - 2004-04-11 21:25:25
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage Modified Files: configure.in Log Message: Some icon grabbing code initially for minimised windows, not working yet, in step anyone who can fix it =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/configure.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- configure.in 11 Apr 2004 14:31:50 -0000 1.4 +++ configure.in 11 Apr 2004 21:11:44 -0000 1.5 @@ -92,6 +92,19 @@ AC_SUBST(esmart_cflags) AC_SUBST(esmart_libs) +PROG="imlib2-config"; +AC_PATH_PROG(IMLIB_CONFIG, $PROG, "", $PATH) +if [ test -z $IMLIB_CONFIG ]; then + echo $PROG " is not in your \$PATH. Please ensure it is."; + echo "Read the manual page for you shell as to how to extend your path."; + echo "FATAL ERROR. ABORT."; + exit -1; +fi +imlib_cflags=`$IMLIB_CONFIG --cflags` +imlib_libs=`$IMLIB_CONFIG --libs` +AC_SUBST(imlib_cflags) +AC_SUBST(imlib_libs) + dnl Set PACKAGE_SOURCE_DIR in config.h. #packagesrcdir=`cd $srcdir && pwd` @@ -113,7 +126,16 @@ [ AC_DEFINE(HAVE_TRANS_BG, [], [Esmart Pseudo-transparency support]) have_esmart_trans="yes" ]) - + +have_imlib="no" +dnl Make sure the imlib header/lib is available +AC_CHECK_HEADER( Imlib2.h, + [ AC_DEFINE(HAVE_IMLIB, [], [Imlib Image Manipulation support]) + have_imlib="yes" + ]) + + + AC_OUTPUT([ Makefile src/Makefile |
From: <enl...@li...> - 2004-04-11 21:25:25
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: Makefile.am engage.h icon.c Log Message: Some icon grabbing code initially for minimised windows, not working yet, in step anyone who can fix it =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- Makefile.am 11 Apr 2004 14:31:51 -0000 1.2 +++ Makefile.am 11 Apr 2004 21:11:44 -0000 1.3 @@ -6,7 +6,8 @@ -I$(top_srcdir)/lib \ @evas_cflags@ \ @ecore_cflags@ \ -@esmart_cflags@ +@esmart_cflags@ \ +@imlib_cflags@ bin_PROGRAMS = engage @@ -20,5 +21,5 @@ userconfig.c -engage_LDADD = @evas_libs@ @ecore_libs@ @esmart_libs@ +engage_LDADD = @evas_libs@ @ecore_libs@ @esmart_libs@ @imlib_libs@ =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- engage.h 11 Apr 2004 14:31:51 -0000 1.2 +++ engage.h 11 Apr 2004 21:11:44 -0000 1.3 @@ -2,6 +2,7 @@ #define _OD_ENGAGE_H #include <Ecore.h> +#include <Ecore_X.h> #include <Ecore_Evas.h> #include <Ecore_Config.h> #include <stdlib.h> =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- icon.c 10 Apr 2004 20:47:39 -0000 1.1 +++ icon.c 11 Apr 2004 21:11:44 -0000 1.2 @@ -1,5 +1,11 @@ #include "engage.h" #include "limits.h" +#include "config.h" +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#ifdef HAVE_IMLIB +#include <Imlib2.h> +#endif // for stat #include <sys/types.h> #include <sys/stat.h> @@ -12,6 +18,9 @@ Evas_List *icon_paths = NULL; static OD_Icon *od_icon_new(const char *name, const char *icon_path); +#ifdef HAVE_IMLIB +static OD_Icon *od_icon_grab(const char *name, Ecore_X_Window win); +#endif static void od_icon_mapping_get(const char *winclass, char **name, char **icon_name); // DON'T free returned static char *od_icon_path_get(const char *icon_name); @@ -58,8 +67,15 @@ od_icon_mapping_get(winclass, &name, &icon_name); char *icon_path = od_icon_path_get(icon_name); +#if 0 +# ifdef HAVE_IMLIB + OD_Icon *ret = od_icon_grab(title, win); +# else OD_Icon *ret = od_icon_new(title, icon_path); - +# endif +#else + OD_Icon *ret = od_icon_new(title, icon_path); +#endif fprintf(stderr, "new minwin: icon_path=\"%s\"\n", icon_path); ret->type = minimised_window; ret->data.minwin.window = win; @@ -69,6 +85,38 @@ return ret; } +#ifdef HAVE_IMLIB +OD_Icon * +od_icon_grab(const char *name, Ecore_X_Window win) +{ + XWMHints *hints; + Imlib_Image img; + Display *dsp; + int scr, x, y, w, h; + OD_Icon *ret = od_icon_new(name, od_icon_path_get("")); + + dsp = ecore_x_display_get(); + scr = DefaultScreen(dsp); + hints = XGetWMHints(dsp, win); + imlib_context_set_display(dsp); + imlib_context_set_visual(DefaultVisual(dsp, scr)); + imlib_context_set_colormap(DefaultColormap(dsp, scr)); + imlib_context_set_dither_mask(0); + imlib_context_set_drawable(hints->icon_pixmap); + + ecore_x_pixmap_geometry_get(hints->icon_pixmap, &x, &y, &w, &h); + printf("size is %d, %d, %d, %d\n", x, y, w, h); + //XSync(dsp, False); + img = imlib_create_image_from_drawable(hints->icon_mask, x, y, w, h, 0); + + //evas_object_image_pixels_import(ret->icon, imlib_image_get_data()); + //imlib_free_image(); + + XFree(hints); + return ret; +} +#endif + OD_Icon * od_icon_new(const char *name, const char *icon_file) { |
From: <enl...@li...> - 2004-04-11 22:08:56
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: window.c Log Message: wrong behaviour =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- window.c 11 Apr 2004 21:50:37 -0000 1.3 +++ window.c 11 Apr 2004 21:55:14 -0000 1.4 @@ -78,8 +78,8 @@ ecore_evas_show(ee); -#ifdef HAVE_TRANS_BG if (options.mode == OM_BELOW) { +#ifdef HAVE_TRANS_BG o = esmart_trans_x11_new(evas); evas_object_layer_set(o, 0); evas_object_move(o, 0, 0); @@ -90,16 +90,16 @@ (int) (res_y - options.height), options.width, options.height); evas_object_show(o); - } #else - o = evas_object_rectangle_add(evas); - evas_object_color_set(o, 0, 0, 0, 255); - evas_object_layer_set(o, 0); - evas_object_move(o, 0, 0); - evas_object_resize(o, options.width, options.height); - evas_object_name_set(o, "trans"); - evas_object_show(o); + o = evas_object_rectangle_add(evas); + evas_object_color_set(o, 0, 0, 0, 255); + evas_object_layer_set(o, 0); + evas_object_move(o, 0, 0); + evas_object_resize(o, options.width, options.height); + evas_object_name_set(o, "trans"); + evas_object_show(o); #endif + } } static void |
From: <enl...@li...> - 2004-04-11 23:17:25
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: config.c engage.h icon.c Log Message: Fix icon grabbing - wrks now, just need to crop - again, feel free to jump in Added grab_icons option, set it to 0 to stop this code from running =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- config.c 11 Apr 2004 14:31:51 -0000 1.2 +++ config.c 11 Apr 2004 23:03:44 -0000 1.3 @@ -13,6 +13,7 @@ ecore_config_default_int("engage.options.height", 100); options.icon_path = PACKAGE_DATA_DIR "/icons/"; ecore_config_default_int_bound("engage.options.mode", OM_ONTOP, 0, 1, 1); + ecore_config_default_int_bound("engage.options.grab_icons", 1, 0, 1, 1); ecore_config_default_int("engage.options.size", 32); ecore_config_default_int("engage.options.spacing", 4); @@ -32,6 +33,7 @@ options.width = ecore_config_get_int("engage.options.width"); options.height = ecore_config_get_int("engage.options.height"); options.mode = ecore_config_get_int("engage.options.mode"); + options.grab_icons = ecore_config_get_int("engage.options.grab_icons"); options.size = ecore_config_get_int("engage.options.size"); options.spacing = ecore_config_get_int("engage.options.spacing"); =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- engage.h 11 Apr 2004 21:11:44 -0000 1.3 +++ engage.h 11 Apr 2004 23:03:44 -0000 1.4 @@ -68,6 +68,7 @@ int width, height; char *icon_path; OD_Mode mode; + int grab_icons; int size, spacing, arrow_size; // icon-* double zoomfactor, dock_zoom_duration; =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- icon.c 11 Apr 2004 21:47:18 -0000 1.3 +++ icon.c 11 Apr 2004 23:03:44 -0000 1.4 @@ -67,15 +67,15 @@ od_icon_mapping_get(winclass, &name, &icon_name); char *icon_path = od_icon_path_get(icon_name); -#if 1 -# ifdef HAVE_IMLIB - OD_Icon *ret = od_icon_grab(title, win); + OD_Icon *ret; +#ifdef HAVE_IMLIB + if (options.grab_icons == 0) + ret = od_icon_new(title, icon_path); + else + ret = od_icon_grab(title, win); # else - OD_Icon *ret = od_icon_new(title, icon_path); + ret = od_icon_new(title, icon_path); # endif -#else - OD_Icon *ret = od_icon_new(title, icon_path); -#endif fprintf(stderr, "new minwin: icon_path=\"%s\"\n", icon_path); ret->type = minimised_window; ret->data.minwin.window = win; @@ -105,15 +105,15 @@ imlib_context_set_dither_mask(0); imlib_context_set_drawable(hints->icon_pixmap); - printf("size is %d, %d, %d, %d\n", x, y, w, h); - //XSync(dsp, False); -//img = imlib_create_image_from_drawable(hints->icon_mask, x, y, w, h, 0); img = imlib_create_image_from_drawable(0, x, y, w, h, 0); imlib_context_set_image(img); + imlib_context_set_mask(hints->icon_mask); - evas_object_image_pixels_import(ret->icon, imlib_image_get_data()); - imlib_free_image(); + imlib_image_set_format("argb"); + evas_object_image_size_set(ret->icon, w, h); + evas_object_image_data_copy_set(ret->icon, imlib_image_get_data_for_reading_only()); + imlib_free_image(); XFree(hints); return ret; } |
From: <enl...@li...> - 2004-04-12 12:50:47
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage Modified Files: TODO Log Message: Update todo list, hehe much work been done =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/TODO,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- TODO 10 Apr 2004 20:47:38 -0000 1.1 +++ TODO 12 Apr 2004 12:37:00 -0000 1.2 @@ -1,4 +1,5 @@ -grab application icons from apps if there is no mapping -add lower - alpha - draw on background version -add option to switch betwwn them +allow (option for) icons to override mapped icons for applinks +ability to screenshot instead of window icon for minimised apps add ecore_config to colors +a "background cache" when in on top mode stops so many window resizes + |
From: <enl...@li...> - 2004-04-13 12:48:23
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage Modified Files: TODO Log Message: Extended use of grabbed icons grab_min_icons is the new place for controlling minimised windows icons, grap_app_icons if on will allow X icons to override mappings on the applinks =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- TODO 12 Apr 2004 12:37:00 -0000 1.2 +++ TODO 13 Apr 2004 12:34:26 -0000 1.3 @@ -1,5 +1,6 @@ -allow (option for) icons to override mapped icons for applinks ability to screenshot instead of window icon for minimised apps add ecore_config to colors a "background cache" when in on top mode stops so many window resizes +different orientations, so it can be used vertically +merge x icons into a "template" to give a unified look |
From: <enl...@li...> - 2004-04-13 12:48:24
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: config.c engage.h icon.c window.c wm.c Log Message: Extended use of grabbed icons grab_min_icons is the new place for controlling minimised windows icons, grap_app_icons if on will allow X icons to override mappings on the applinks =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- config.c 11 Apr 2004 23:03:44 -0000 1.3 +++ config.c 13 Apr 2004 12:34:26 -0000 1.4 @@ -13,7 +13,8 @@ ecore_config_default_int("engage.options.height", 100); options.icon_path = PACKAGE_DATA_DIR "/icons/"; ecore_config_default_int_bound("engage.options.mode", OM_ONTOP, 0, 1, 1); - ecore_config_default_int_bound("engage.options.grab_icons", 1, 0, 1, 1); + ecore_config_default_int_bound("engage.options.grab_min_icons", 1, 0, 1, 1); + ecore_config_default_int_bound("engage.options.grab_app_icons", 1, 0, 1, 1); ecore_config_default_int("engage.options.size", 32); ecore_config_default_int("engage.options.spacing", 4); @@ -33,7 +34,10 @@ options.width = ecore_config_get_int("engage.options.width"); options.height = ecore_config_get_int("engage.options.height"); options.mode = ecore_config_get_int("engage.options.mode"); - options.grab_icons = ecore_config_get_int("engage.options.grab_icons"); + options.grab_min_icons = + ecore_config_get_int("engage.options.grab_min_icons"); + options.grab_app_icons = + ecore_config_get_int("engage.options.grab_app_icons"); options.size = ecore_config_get_int("engage.options.size"); options.spacing = ecore_config_get_int("engage.options.spacing"); =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- engage.h 11 Apr 2004 23:03:44 -0000 1.4 +++ engage.h 13 Apr 2004 12:34:26 -0000 1.5 @@ -47,6 +47,10 @@ OD_Icon *od_icon_new_dicon(const char *command, const char *name, const char *icon_name); OD_Icon *od_icon_new_minwin(Ecore_X_Window win); + +#ifdef HAVE_IMLIB +void *od_icon_grab(OD_Icon * icon, Ecore_X_Window win); +#endif void od_icon_del(OD_Icon * od_icon); void od_icon_arrow_show(OD_Icon * icon); void od_icon_arrow_hide(OD_Icon * icon); @@ -68,7 +72,7 @@ int width, height; char *icon_path; OD_Mode mode; - int grab_icons; + int grab_min_icons, grab_app_icons; int size, spacing, arrow_size; // icon-* double zoomfactor, dock_zoom_duration; =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- icon.c 12 Apr 2004 08:59:40 -0000 1.5 +++ icon.c 13 Apr 2004 12:34:26 -0000 1.6 @@ -18,9 +18,6 @@ Evas_List *icon_paths = NULL; static OD_Icon *od_icon_new(const char *name, const char *icon_path); -#ifdef HAVE_IMLIB -static OD_Icon *od_icon_grab(const char *name, Ecore_X_Window win); -#endif static void od_icon_mapping_get(const char *winclass, char **name, char **icon_name); // DON'T free returned static char *od_icon_path_get(const char *icon_name); @@ -68,14 +65,11 @@ od_icon_mapping_get(winclass, &name, &icon_name); char *icon_path = od_icon_path_get(icon_name); OD_Icon *ret; -#ifdef HAVE_IMLIB - if (options.grab_icons == 0) - ret = od_icon_new(title, icon_path); - else - ret = od_icon_grab(title, win); -# else ret = od_icon_new(title, icon_path); -# endif +#ifdef HAVE_IMLIB + if (options.grab_min_icons != 0) + od_icon_grab(ret, win); +#endif fprintf(stderr, "new minwin: icon_path=\"%s\"\n", icon_path); ret->type = minimised_window; ret->data.minwin.window = win; @@ -86,15 +80,14 @@ } #ifdef HAVE_IMLIB -OD_Icon * -od_icon_grab(const char *name, Ecore_X_Window win) +void +od_icon_grab(OD_Icon * icon, Ecore_X_Window win) { - XWMHints *hints; - Imlib_Image img; - Display *dsp; - int scr, x, y, w, h; - OD_Icon *ret = od_icon_new(name, od_icon_path_get("")); - Pixmap pmap, mask; + XWMHints *hints; + Imlib_Image img; + Display *dsp; + int scr, x, y, w, h; + Pixmap pmap, mask; dsp = ecore_x_display_get(); scr = DefaultScreen(dsp); @@ -121,13 +114,13 @@ img = imlib_create_image_from_drawable(mask, x, y, w, h, 0); imlib_context_set_image(img); - evas_object_image_size_set(ret->icon, w, h); - evas_object_image_data_copy_set(ret->icon, imlib_image_get_data_for_reading_only()); + evas_object_image_size_set(icon->icon, w, h); + evas_object_image_data_copy_set(icon->icon, + imlib_image_get_data_for_reading_only()); imlib_free_image(); done: - return ret; } #endif =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- window.c 11 Apr 2004 21:55:14 -0000 1.4 +++ window.c 13 Apr 2004 12:34:26 -0000 1.5 @@ -77,7 +77,7 @@ ecore_x_window_prop_layer_set(od_window, ECORE_X_WINDOW_LAYER_BELOW); ecore_evas_show(ee); - + if (options.mode == OM_BELOW) { #ifdef HAVE_TRANS_BG o = esmart_trans_x11_new(evas); @@ -97,7 +97,7 @@ evas_object_move(o, 0, 0); evas_object_resize(o, options.width, options.height); evas_object_name_set(o, "trans"); - evas_object_show(o); + evas_object_show(o); #endif } } =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/wm.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- wm.c 10 Apr 2004 20:47:39 -0000 1.1 +++ wm.c 13 Apr 2004 12:34:26 -0000 1.2 @@ -1,4 +1,5 @@ #include "engage.h" +#include "config.h" #include "Ecore_X.h" #include <X11/Xatom.h> #include <X11/Xutil.h> @@ -186,6 +187,10 @@ od_dock_add_minwin(wfresh->minwin); } else wfresh->minwin = NULL; +#ifdef HAVE_IMLIB + if (options.grab_app_icons) + od_icon_grab(wfresh->applnk, wfresh->id); +#endif } free(title); |
From: <enl...@li...> - 2004-04-13 14:39:35
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: engage.h Log Message: oops, spanky spank =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- engage.h 13 Apr 2004 12:34:26 -0000 1.5 +++ engage.h 13 Apr 2004 14:25:37 -0000 1.6 @@ -49,7 +49,7 @@ OD_Icon *od_icon_new_minwin(Ecore_X_Window win); #ifdef HAVE_IMLIB -void *od_icon_grab(OD_Icon * icon, Ecore_X_Window win); +void od_icon_grab(OD_Icon * icon, Ecore_X_Window win); #endif void od_icon_del(OD_Icon * od_icon); void od_icon_arrow_show(OD_Icon * icon); |
From: <enl...@li...> - 2004-04-14 22:51:29
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/themes Log Message: Directory /cvsroot/enlightenment/misc/engage/data/themes added to the repository |
From: <enl...@li...> - 2004-04-14 22:51:29
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/themes/gentoo Log Message: Directory /cvsroot/enlightenment/misc/engage/data/themes/gentoo added to the repository |
From: <enl...@li...> - 2004-04-14 22:52:42
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/themes/gentoo/images Log Message: Directory /cvsroot/enlightenment/misc/engage/data/themes/gentoo/images added to the repository |
From: <enl...@li...> - 2004-04-14 22:59:21
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/themes/gentoo/images Added Files: blank.png Log Message: Added move/resize callbacks for background transparency fixes and saving window size started basis of edje theme by creating the icon eet. note that now teh bubbled icons should be changed, as they are 'double bubbled' |
From: <enl...@li...> - 2004-04-14 22:59:21
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/data/themes Added Files: Makefile.am gentoo.edc Log Message: Added move/resize callbacks for background transparency fixes and saving window size started basis of edje theme by creating the icon eet. note that now teh bubbled icons should be changed, as they are 'double bubbled' |
From: <enl...@li...> - 2004-04-14 22:59:23
|
Enlightenment CVS committal Author : handyande Project : misc Module : engage Dir : misc/engage/src Modified Files: Makefile.am config.c engage.h icon.c window.c Log Message: Added move/resize callbacks for background transparency fixes and saving window size started basis of edje theme by creating the icon eet. note that now teh bubbled icons should be changed, as they are 'double bubbled' =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 11 Apr 2004 21:11:44 -0000 1.3 +++ Makefile.am 14 Apr 2004 22:59:15 -0000 1.4 @@ -5,6 +5,7 @@ -I/usr/local/include \ -I$(top_srcdir)/lib \ @evas_cflags@ \ +@edje_cflags@ \ @ecore_cflags@ \ @esmart_cflags@ \ @imlib_cflags@ @@ -21,5 +22,5 @@ userconfig.c -engage_LDADD = @evas_libs@ @ecore_libs@ @esmart_libs@ @imlib_libs@ +engage_LDADD = @evas_libs@ @edje_libs@ @ecore_libs@ @esmart_libs@ @imlib_libs@ =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/config.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- config.c 13 Apr 2004 12:34:26 -0000 1.4 +++ config.c 14 Apr 2004 22:59:15 -0000 1.5 @@ -11,6 +11,7 @@ { ecore_config_default_int("engage.options.width", 1024); ecore_config_default_int("engage.options.height", 100); + ecore_config_default_string("engage.options.theme", "gentoo"); options.icon_path = PACKAGE_DATA_DIR "/icons/"; ecore_config_default_int_bound("engage.options.mode", OM_ONTOP, 0, 1, 1); ecore_config_default_int_bound("engage.options.grab_min_icons", 1, 0, 1, 1); @@ -33,6 +34,7 @@ ecore_config_load(); options.width = ecore_config_get_int("engage.options.width"); options.height = ecore_config_get_int("engage.options.height"); + options.theme = ecore_config_get_string("engage.options.theme"); options.mode = ecore_config_get_int("engage.options.mode"); options.grab_min_icons = ecore_config_get_int("engage.options.grab_min_icons"); =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/engage.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- engage.h 13 Apr 2004 14:25:37 -0000 1.6 +++ engage.h 14 Apr 2004 22:59:15 -0000 1.7 @@ -5,6 +5,7 @@ #include <Ecore_X.h> #include <Ecore_Evas.h> #include <Ecore_Config.h> +#include <Edje.h> #include <stdlib.h> #include <stdio.h> @@ -70,7 +71,7 @@ struct _OD_Options { int width, height; - char *icon_path; + char *icon_path, *theme; OD_Mode mode; int grab_min_icons, grab_app_icons; @@ -109,7 +110,7 @@ #define OD_ICON_STATE_BOUNCING 0x00000008 struct _OD_Icon { - Evas_Object *icon, *tt_txt, *tt_shd, *arrow; + Evas_Object *icon, *pic, *tt_txt, *tt_shd, *arrow; unsigned state; // see above char *name; double x, y; // relative to evas =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- icon.c 13 Apr 2004 12:34:26 -0000 1.6 +++ icon.c 14 Apr 2004 22:59:15 -0000 1.7 @@ -114,9 +114,11 @@ img = imlib_create_image_from_drawable(mask, x, y, w, h, 0); imlib_context_set_image(img); - evas_object_image_size_set(icon->icon, w, h); - evas_object_image_data_copy_set(icon->icon, + evas_object_image_size_set(icon->pic, w, h); + evas_object_image_data_copy_set(icon->pic, imlib_image_get_data_for_reading_only()); + edje_object_part_unswallow(icon->icon, "EquateIcon"); + edje_object_part_swallow(icon->icon, "EquateIcon", icon->pic); imlib_free_image(); @@ -124,27 +126,62 @@ } #endif +void +od_object_resize_intercept_cb(void *data, Evas_Object * o, + Evas_Coord w, Evas_Coord h) +{ + if (o) + { + if (!strcmp("edje", evas_object_type_get(o))) + { + evas_object_resize(o, w, h); + o=edje_object_part_swallow_get(o, "EngageIcon"); + evas_object_image_fill_set(o, 0.5, 0.5, w * 0.5, h * 0.5); + evas_object_resize(o, w * 0.5, h * 0.5); + } + } +} + + OD_Icon * od_icon_new(const char *name, const char *icon_file) { OD_Icon *ret = (OD_Icon *) malloc(sizeof(OD_Icon)); + char *path[PATH_MAX]; ret->name = strdup(name); ret->scale = 0.0; - Evas_Object *icon = ret->icon = evas_object_image_add(evas); + Evas_Object *icon = ret->icon = edje_object_add(evas); Evas_Object *tt_txt = ret->tt_txt = evas_object_text_add(evas); Evas_Object *tt_shd = ret->tt_shd = evas_object_text_add(evas); - + Evas_Object *pic = ret->pic = evas_object_image_add(evas); + evas_object_image_file_set(pic, icon_file, NULL); + evas_object_image_alpha_set(pic, 1); + evas_object_image_smooth_scale_set(pic, 1); + evas_object_layer_set(pic, 200); + evas_object_name_set(pic, "icon"); + + evas_object_show(pic); + ret->arrow = NULL; ret->state = 0; ret->appear_timer = NULL; + - evas_object_image_file_set(icon, icon_file, NULL); + if ((strstr(options.theme, "/"))) + snprintf(path, PATH_MAX, options.theme); + else + snprintf(path, PATH_MAX, PACKAGE_DATA_DIR "/themes/%s.eet", options.theme); + + edje_object_file_set(icon, path, "Main"); + edje_object_part_swallow(icon, "EngageIcon", pic); evas_object_image_alpha_set(icon, 1); evas_object_image_smooth_scale_set(icon, 1); evas_object_layer_set(icon, 100); - evas_object_name_set(icon, "icon"); evas_object_show(icon); + evas_object_intercept_resize_callback_add(icon, + od_object_resize_intercept_cb,NULL); + evas_object_text_font_set(tt_txt, options.tt_fa, options.tt_fs); evas_object_text_text_set(tt_txt, name); @@ -161,7 +198,6 @@ (options.tt_shd_color >> 8) & 0xff, (options.tt_shd_color >> 0) & 0xff, 127); evas_object_layer_set(tt_shd, 199); - return ret; } =================================================================== RCS file: /cvsroot/enlightenment/misc/engage/src/window.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- window.c 13 Apr 2004 12:34:26 -0000 1.5 +++ window.c 14 Apr 2004 22:59:15 -0000 1.6 @@ -21,6 +21,41 @@ void *event); void +od_window_move() +{ + int x, y, w, h; + Evas_Object *o = NULL; + + ecore_evas_geometry_get (ee, &x, &y, &w, &h); + +#ifdef HAVE_TRANS_BG + if((o = evas_object_name_find(ecore_evas_get(ee), "trans"))) + esmart_trans_x11_freshen(o, x, y, w, h); +#endif +} + +void +od_window_resize() +{ + int x, y, w, h; + Evas_Object *o = NULL; + + ecore_evas_geometry_get(ee, &x, &y, &w, &h); + +#ifdef HAVE_TRANS_BG + if((o = evas_object_name_find(ecore_evas_get(ee), "trans"))) + { + evas_object_resize(o, w, h); + esmart_trans_x11_freshen(o, x, y, w, h); + } +#endif + options.width = w; + options.height = h; + ecore_config_set_int("engage.options.width", w); + ecore_config_set_int("engage.options.height", h); +} + +void od_window_init() { Ecore_X_Display *dsp; @@ -47,8 +82,6 @@ ecore_evas_shaped_set(ee, 1); else ecore_evas_shaped_set(ee, 0); - ecore_evas_size_min_set(ee, options.width, options.height); - ecore_evas_size_max_set(ee, options.width, options.height); ecore_evas_callback_pre_render_set(ee, od_dock_redraw); ecore_evas_callback_focus_out_set(ee, handle_mouse_out); @@ -77,6 +110,8 @@ ecore_x_window_prop_layer_set(od_window, ECORE_X_WINDOW_LAYER_BELOW); ecore_evas_show(ee); + ecore_evas_callback_move_set(ee, od_window_move); + ecore_evas_callback_resize_set(ee, od_window_resize); if (options.mode == OM_BELOW) { #ifdef HAVE_TRANS_BG @@ -130,7 +165,7 @@ Evas_List *i2 = dock.icons; while (i2 && !done) { - if (((OD_Icon *) (i2->data))->icon == (Evas_Object *) item->data) { + if (((OD_Icon *) (i2->data))->pic == (Evas_Object *) item->data) { icon = (OD_Icon *) i2->data; done = true; } |