Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/estyle
Dir : e17/libs/estyle/src
Modified Files:
Estyle_private.h estyle.c
Log Message:
Allow for using fixed size estyles. This is used by etox to track obstacles.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/estyle/src/Estyle_private.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- Estyle_private.h 5 Aug 2003 16:42:44 -0000 1.12
+++ Estyle_private.h 8 Aug 2003 05:01:03 -0000 1.13
@@ -101,6 +101,7 @@
void estyle_show(Evas_Object *obj);
void estyle_hide(Evas_Object *obj);
void estyle_move(Evas_Object *obj, double x, double y);
+void estyle_resize(Evas_Object *obj, double w, double h);
void estyle_set_layer(Evas_Object *obj, int layer);
void estyle_set_color(Evas_Object *obj, int r, int g, int b, int a);
void estyle_set_clip(Evas_Object *obj, Evas_Object *clip);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/estyle/src/estyle.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- estyle.c 5 Aug 2003 16:42:44 -0000 1.26
+++ estyle.c 8 Aug 2003 05:01:04 -0000 1.27
@@ -37,7 +37,7 @@
estyle_smart = evas_smart_new("estyle_smart", NULL,
estyle_free, estyle_set_layer, NULL,
NULL, NULL, NULL,
- estyle_move, NULL, estyle_show,
+ estyle_move, estyle_resize, estyle_show,
estyle_hide, estyle_set_color, estyle_set_clip,
estyle_unset_clip, NULL);
_estyle_color_init();
@@ -174,6 +174,31 @@
}
/**
+ * estyle_resize - resize a fixed estyle into the correct position
+ * @es: the estyle to be moved
+ * @x: the new x coordinate for the estyle
+ * @y: the new y coordinate for the estyle
+ *
+ * Returns no value. Moves the requested estyle into the requested position.
+ */
+void estyle_resize(Evas_Object *obj, double w, double h)
+{
+ Estyle *es;
+
+ es = evas_object_smart_data_get(obj);
+
+ if (!(es->flags & ESTYLE_BIT_FIXED))
+ return;
+
+ if (es->w == w && es->h == h)
+ return;
+
+ es->w = w;
+ es->h = h;
+ evas_object_resize(obj, w, h);
+}
+
+/**
* estyle_get_color - get the color of the estyle
* @es: the estyle to get the color
* @r: the pointer to the int to store the red value of the estyle
@@ -878,10 +903,8 @@
es = evas_object_smart_data_get(obj);
es->flags |= ESTYLE_BIT_FIXED;
- es->x = x;
- es->y = y;
- es->w = w;
- es->h = h;
+ evas_object_move(obj, x, y);
+ evas_object_resize(obj, w, h);
}
/**
@@ -934,6 +957,8 @@
es->h = D2I_ROUND(h) + (es->style ? es->style->info->top_push
+ es->style->info->bottom_push : 0);
}
+
+ evas_object_resize(es->smart_obj, es->w, es->h);
}
/**
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs