Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_image.c ewl_misc.c ewl_textarea.c ewl_widget.c
Log Message:
Filled in some missing unrealize functions while tracking down a clipping bug
for the scrollpane.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_image.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -3 -r1.32 -r1.33
--- ewl_image.c 16 Oct 2003 20:54:25 -0000 1.32
+++ ewl_image.c 21 Oct 2003 05:48:06 -0000 1.33
@@ -3,6 +3,8 @@
void __ewl_image_realize(Ewl_Widget * w, void *ev_data,
void *user_data);
+void __ewl_image_unrealize(Ewl_Widget * w, void *ev_data,
+ void *user_data);
void __ewl_image_configure(Ewl_Widget * w, void *ev_data,
void *user_data);
void __ewl_image_mouse_down(Ewl_Widget * w, void *ev_data,
@@ -56,6 +58,8 @@
* Append necessary callbacks.
*/
ewl_callback_append(w, EWL_CALLBACK_REALIZE, __ewl_image_realize, NULL);
+ ewl_callback_append(w, EWL_CALLBACK_UNREALIZE, __ewl_image_unrealize,
+ NULL);
ewl_callback_append(w, EWL_CALLBACK_CONFIGURE,
__ewl_image_configure, NULL);
ewl_callback_append(w, EWL_CALLBACK_MOUSE_DOWN,
@@ -283,6 +287,22 @@
ewl_object_get_preferred_h(EWL_OBJECT(i)));
else
ewl_image_scale(i, i->sw, i->sh);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+void __ewl_image_unrealize(Ewl_Widget * w, void *ev_data, void *user_data)
+{
+ Ewl_Image *i;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+
+ i = EWL_IMAGE(w);
+
+ if (i->image) {
+ evas_object_del(i->image);
+ i->image = NULL;
+ }
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_misc.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -3 -r1.44 -r1.45
--- ewl_misc.c 20 Oct 2003 16:06:42 -0000 1.44
+++ ewl_misc.c 21 Oct 2003 05:48:06 -0000 1.45
@@ -279,20 +279,39 @@
* it's parent widget.
*/
if (w->parent) {
+ int obscured = 0;
int x, y;
int width, height;
Ewl_Widget *p = w->parent;
ewl_object_get_current_geometry(EWL_OBJECT(w), &x, &y, &width,
&height);
- if ((int)(x + width) < CURRENT_X(p) ||
- x > (int)(CURRENT_X(p) + CURRENT_W(p)) ||
- (int)(y + height) < CURRENT_Y(p) ||
- y > (int)(CURRENT_Y(p) + CURRENT_H(p)) ||
- (int)(x + width) < CURRENT_X(emb) ||
- x > (int)(CURRENT_X(emb) + CURRENT_W(emb)) ||
- (int)(y + height) < CURRENT_Y(emb) ||
- y > (int)(CURRENT_Y(emb) + CURRENT_H(emb))) {
+
+ if ((x + width) < CURRENT_X(p))
+ obscured = 1;
+
+ if (x > (CURRENT_X(p) + CURRENT_W(p)))
+ obscured = 1;
+
+ if ((y + height) < CURRENT_Y(p))
+ obscured = 1;
+
+ if (y > (CURRENT_Y(p) + CURRENT_H(p)))
+ obscured = 1;
+
+ if ((x + width) < CURRENT_X(emb))
+ obscured = 1;
+
+ if (x > (CURRENT_X(emb) + CURRENT_W(emb)))
+ obscured = 1;
+
+ if ((y + height) < CURRENT_Y(emb))
+ obscured = 1;
+
+ if (y > (CURRENT_Y(emb) + CURRENT_H(emb)))
+ obscured = 1;
+
+ if (obscured) {
ewl_object_add_visible(EWL_OBJECT(w),
EWL_FLAG_VISIBLE_OBSCURED);
if (w->fx_clip_box)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_textarea.c 18 Oct 2003 17:00:37 -0000 1.17
+++ ewl_textarea.c 21 Oct 2003 05:48:06 -0000 1.18
@@ -1,12 +1,11 @@
-
#include <Ewl.h>
void __ewl_textarea_realize(Ewl_Widget * w, void *ev_data,
void *user_data);
+void __ewl_textarea_unrealize(Ewl_Widget * w, void *ev_data,
+ void *user_data);
void __ewl_textarea_configure(Ewl_Widget * w, void *ev_data,
void *user_data);
-void __ewl_textarea_reparent(Ewl_Widget * w, void *ev_data,
- void *user_data);
void __ewl_textarea_update_size(Ewl_TextArea * ta);
/**
@@ -51,9 +50,9 @@
ewl_callback_append(w, EWL_CALLBACK_REALIZE, __ewl_textarea_realize,
NULL);
- ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, __ewl_textarea_configure,
+ ewl_callback_append(w, EWL_CALLBACK_UNREALIZE, __ewl_textarea_unrealize,
NULL);
- ewl_callback_append(w, EWL_CALLBACK_REPARENT, __ewl_textarea_reparent,
+ ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, __ewl_textarea_configure,
NULL);
if (text)
@@ -229,7 +228,7 @@
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
-void __ewl_textarea_configure(Ewl_Widget * w, void *ev_data, void *user_data)
+void __ewl_textarea_unrealize(Ewl_Widget * w, void *ev_data, void *user_data)
{
Ewl_TextArea *ta;
@@ -238,19 +237,15 @@
ta = EWL_TEXTAREA(w);
- /*
- * Update the etox position and size.
- */
- if (ta->etox) {
- evas_object_move(ta->etox, CURRENT_X(w) + INSET_LEFT(w),
- CURRENT_Y(w) + INSET_TOP(w));
- evas_object_layer_set(ta->etox, ewl_widget_get_layer_sum(w));
- }
+ ta->etox_context = etox_context_save(ta->etox);
+
+ evas_object_clip_unset(ta->etox);
+ evas_object_del(ta->etox);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
-void __ewl_textarea_reparent(Ewl_Widget * w, void *ev_data, void *user_data)
+void __ewl_textarea_configure(Ewl_Widget * w, void *ev_data, void *user_data)
{
Ewl_TextArea *ta;
@@ -260,10 +255,12 @@
ta = EWL_TEXTAREA(w);
/*
- * Change the clipping of the etox to the new parent.
+ * Update the etox position and size.
*/
- if (ta->etox)
- evas_object_clip_set(ta->etox, w->fx_clip_box);
+ if (ta->etox) {
+ evas_object_move(ta->etox, CURRENT_X(w), CURRENT_Y(w));
+ evas_object_layer_set(ta->etox, ewl_widget_get_layer_sum(w));
+ }
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -279,9 +276,6 @@
* Adjust the properties of the widget to indicate the size of the text.
*/
evas_object_geometry_get(ta->etox, &x, &y, &width, &height);
-
- width += INSET_LEFT(ta) + INSET_RIGHT(ta);
- height += INSET_TOP(ta) + INSET_BOTTOM(ta);
/*
* Set the preferred size to the size of the etox and request that
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- ewl_widget.c 20 Oct 2003 18:09:43 -0000 1.79
+++ ewl_widget.c 21 Oct 2003 05:48:06 -0000 1.80
@@ -523,9 +523,10 @@
if (!op)
ewl_callback_prepend(w, EWL_CALLBACK_DESTROY,
__ewl_widget_child_destroy, NULL);
- ewl_callback_call(w, EWL_CALLBACK_REPARENT);
- if (REALIZED(w) && VISIBLE(w))
+ if (REALIZED(w) && VISIBLE(w)) {
+ ewl_callback_call(w, EWL_CALLBACK_REPARENT);
ewl_container_call_child_add(EWL_CONTAINER(p), w);
+ }
}
DLEAVE_FUNCTION(DLEVEL_STABLE);
-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs