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@ \
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@
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
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs