From: <enl...@li...> - 2002-08-26 14:56:07
|
Enlightenment CVS committal Author : monkeyiq Project : misc Module : gevas2 Dir : misc/gevas2/src Modified Files: gevas.c gevas_sprite.c gevas_sprite.h gevasimage.c gevasimage.h gevasobj.c gevasobj.h gevastwin.c gevastwin.h Log Message: some more goodies =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevas.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- gevas.c 17 Aug 2002 15:26:38 -0000 1.3 +++ gevas.c 26 Aug 2002 14:56:05 -0000 1.4 @@ -512,10 +512,10 @@ static void gevas_init(GtkgEvas * ev) { - printf("gevas_init()\n"); +/* printf("gevas_init()\n"); */ GTK_WIDGET_SET_FLAGS(GTK_WIDGET(ev), GTK_CAN_FOCUS); - printf("gevas_init() 1\n"); +/* printf("gevas_init() 1\n"); */ ev->scrolledwindow = 0; ev->evas = evas_new(); @@ -532,22 +532,22 @@ evas_output_method_set( ev->evas, evas_render_method_lookup("software_x11")); - printf("gevas_init() end\n"); +/* printf("gevas_init() end\n"); */ } GtkWidget *gevas_new(void) { GtkgEvas *ev; - fprintf(stderr,"gevas_new(void)\n"); +/* fprintf(stderr,"gevas_new(void)\n"); */ ev = gtk_type_new(gevas_get_type()); - fprintf(stderr,"gevas_new(1)\n"); +/* fprintf(stderr,"gevas_new(1)\n"); */ gevas_set_size_request_x(ev, 200); gevas_set_size_request_y(ev, 200); - fprintf(stderr,"gevas_new(2)\n"); +/* fprintf(stderr,"gevas_new(2)\n"); */ return GTK_WIDGET(ev); } @@ -1263,13 +1263,17 @@ } -gint gevas_view_redraw_cb(gpointer data) +static gint gevas_view_redraw_cb(gpointer data) { - GtkgEvas* gevas = GTK_GEVAS( data ); + GtkgEvas* gevas = GTK_GEVAS( data ); GtkgEvas* ev = gevas; GdkRectangle* area = &ev->evas_r; GdkRectangle rect; + /* prevent evas from breaking if window isn't mapped */ + if(!GTK_WIDGET_MAPPED(ev)) + return FALSE; + fprintf(stderr,"gevas_view_redraw_cb!\n"); evas_obscured_clear(ev->evas); @@ -1308,6 +1312,10 @@ void gevas_queue_redraw(GtkgEvas * gevas) { + /* prevent evas from breaking if window isn't mapped */ + if( !gevas || !GTK_WIDGET_REALIZED(gevas) || !GTK_WIDGET_MAPPED(gevas) ) + return; + // fprintf(stderr,"gevas_queue_redraw() \n"); /* This call seems to be much slower to use.*/ =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevas_sprite.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- gevas_sprite.c 18 Aug 2002 12:41:47 -0000 1.4 +++ gevas_sprite.c 26 Aug 2002 14:56:05 -0000 1.5 @@ -409,6 +409,60 @@ } } +static void +set_image_fill(GtkgEvasObj * object, double x, double y, double w, + double h) +{ + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_GEVAS_SPRITE(object)); + GtkgEvasSprite *ev = GTK_GEVAS_SPRITE(object); + Evas_List* li=0; + + for( li=ev->col->selected_objs; li; li = li->next) + { + if(li->data && GTK_IS_GEVASIMAGE(li->data)) + gevasimage_set_image_fill( GTK_GEVASOBJ( li->data ), x, y, w, h ); + } +} + +static void +get_image_fill(GtkgEvasObj * object, + double* x, double* y, + double* w, double* h) +{ + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_GEVAS_SPRITE(object)); + GtkgEvasSprite *ev = GTK_GEVAS_SPRITE(object); + Evas_List* li=0; + GtkgEvasObj* active = getActiveObject( ev ); + + if( GTK_IS_GEVASIMAGE( active ) ) + gevasimage_get_image_fill( GTK_GEVASIMAGE(active), x, y, w, h ); +} + + +static double +get_image_fill_width( GtkgEvasObj * object ) +{ + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_GEVAS_SPRITE(object)); + GtkgEvasSprite *ev = GTK_GEVAS_SPRITE(object); + Evas_List* li=0; + + return get_image_fill_width( getActiveObject( ev ) ); +} + +static double +get_image_fill_height(GtkgEvasObj * object ) +{ + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_GEVAS_SPRITE(object)); + GtkgEvasSprite *ev = GTK_GEVAS_SPRITE(object); + Evas_List* li=0; + + return get_image_fill_height( getActiveObject( ev ) ); +} + /********************************************************************************/ /********************************************************************************/ @@ -474,6 +528,13 @@ g_return_if_fail(GTK_IS_GEVAS_SPRITE(ev)); g_return_if_fail(GTK_IS_GEVAS_OBJ_COLLECTION(ev->col)); + if( ev->m_timerID ) + { + g_source_remove( ev->m_timerID ); + ev->m_timerID = 0; + } + + gevas_obj_collection_hide( ev->col ); gevas_obj_collection_clear( ev->col ); } @@ -1106,22 +1167,26 @@ printf("restart_timer() f:%d inter_d:%d\n",f,inter_d); } - - gtk_timeout_add( delay, anim_frame, ev); - + if( ev->m_timerID ) + g_source_remove( ev->m_timerID ); + ev->m_timerID = gtk_timeout_add( delay, anim_frame, ev); } static gint -anim_frame(gpointer data) +anim_frame(gpointer user_data) { - g_return_if_fail(data != NULL); - g_return_if_fail(GTK_IS_GEVAS_SPRITE(data)); + g_return_if_fail(user_data != NULL); + g_return_if_fail(GTK_IS_GEVAS_SPRITE(user_data)); + GtkgEvasSprite* ev = GTK_GEVAS_SPRITE(user_data); + + clock_sprite( ev ); - clock_sprite( GTK_GEVAS_SPRITE(data) ); - restart_timer( GTK_GEVAS_SPRITE(data) ); + ev->m_timerID = 0; + restart_timer( ev ); + return 0; } @@ -1221,7 +1286,7 @@ (GtkClassInitFunc) NULL, }; - ev_type = gtk_type_unique(gevasobj_get_type(), &ev_info); + ev_type = gtk_type_unique(gevasimage_get_type(), &ev_info); } return ev_type; @@ -1232,6 +1297,7 @@ { GtkObjectClass *object_class; GtkgEvasObjClass* gok = (GtkgEvasObjClass*)klass; + GtkgEvasImageClass* gik = (GtkgEvasImageClass*)klass; object_class = (GtkObjectClass *) klass; parent_class = gtk_type_class(gtk_object_get_type()); @@ -1246,18 +1312,18 @@ gok->_gevasobj_ensure_obj_free = _gevasobj_ensure_obj_free; /** public members **/ - gok->set_color = _gevasobj_set_color; + gok->set_color = _gevasobj_set_color; gok->set_zoom_scale = _gevasobj_set_zoom_scale; - gok->set_layer = _gevasobj_set_layer; - gok->get_layer = _gevasobj_get_layer; - gok->raise = _gevasobj_raise; - gok->lower = _gevasobj_lower; - gok->stack_above = _gevasobj_stack_above; - gok->stack_below = _gevasobj_stack_below; - gok->resize = _gevasobj_resize; + gok->set_layer = _gevasobj_set_layer; + gok->get_layer = _gevasobj_get_layer; + gok->raise = _gevasobj_raise; + gok->lower = _gevasobj_lower; + gok->stack_above = _gevasobj_stack_above; + gok->stack_below = _gevasobj_stack_below; + gok->resize = _gevasobj_resize; gok->get_geometry = _gevasobj_get_geometry; - gok->show = _gevasobj_show; - gok->hide = _gevasobj_hide; + gok->show = _gevasobj_show; + gok->hide = _gevasobj_hide; gok->get_color = _gevasobj_get_color; gok->set_name = _gevasobj_set_name; gok->get_name = _gevasobj_get_name; @@ -1266,8 +1332,14 @@ gok->get_location = _gevasobj_get_location; gok->get_size = _gevasobj_get_size; - gok->add_evhandler = _gevasobj_add_evhandler; + gok->add_evhandler = _gevasobj_add_evhandler; gok->remove_evhandler = _gevasobj_remove_evhandler; + + + gik->set_image_fill = set_image_fill; + gik->get_image_fill = get_image_fill; + gik->get_image_fill_width = get_image_fill_width; + gik->get_image_fill_height = get_image_fill_height; /* signals[SIG_ADD] = @@ -1291,7 +1363,11 @@ { ev->col = gevas_obj_collection_new( GEVAS(ev) ); + ev->frames_to_play = 0; ev->playing_backwards = 0; + ev->current_frame = 0; + ev->m_timerID = 0; + ev->frame_delay_ms_base = 0; ev->frame_delay_ms = 0; =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevas_sprite.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- gevas_sprite.h 18 Aug 2002 12:41:47 -0000 1.3 +++ gevas_sprite.h 26 Aug 2002 14:56:05 -0000 1.4 @@ -32,6 +32,7 @@ #include <gevasev_handler.h> #include <gevas.h> #include <gevasobj.h> +#include <gevasimage.h> #include <gtk/gtkobject.h> #include <gtk/gtk.h> @@ -61,7 +62,7 @@ struct _GtkgEvasSprite { - GtkgEvasObj gobj; + GtkgEvasImage gobj; GtkgEvasObjCollection* col; @@ -70,6 +71,8 @@ gint current_frame; gboolean playing_backwards; + // ID of the timer so that clear() can cancel the animation + guint m_timerID; // These are both temp data used in gevas_sprite_load_from_metadata // gboolean metadata_load_loaded; @@ -86,8 +89,9 @@ GArray* frame_trans_f; // transition function to use between frames }; - struct _GtkgEvasSpriteClass { - GtkgEvasObjClass parent_class; + struct _GtkgEvasSpriteClass + { + GtkgEvasImageClass parent_class; }; =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevasimage.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- gevasimage.c 20 Aug 2002 06:09:07 -0000 1.5 +++ gevasimage.c 26 Aug 2002 14:56:05 -0000 1.6 @@ -94,15 +94,13 @@ #define EVASO(ev) _gevas_get_obj( GTK_OBJECT(ev)) -void -gevasimage_set_image_fill(GtkgEvasObj * object, double x, double y, double w, +static void set_image_fill(GtkgEvasObj * object, double x, double y, double w, double h) { evas_object_image_fill_set( EVASO(object), x, y, w, h ); } -void -gevasimage_get_image_fill(GtkgEvasObj * object, +static void get_image_fill(GtkgEvasObj * object, double* x, double* y, double* w, double* h) { @@ -110,20 +108,44 @@ } -double gevasimage_get_image_fill_width( GtkgEvasObj * object ) +static double get_image_fill_width( GtkgEvasObj * object ) { double w,h,x,y; gevasimage_get_image_fill( object, &x, &y, &w, &h ); return w; } -double gevasimage_get_image_fill_height(GtkgEvasObj * object ) +static double get_image_fill_height(GtkgEvasObj * object ) { double w,h,x,y; gevasimage_get_image_fill( object, &x, &y, &w, &h ); return h; } +#define VTAB ((GtkgEvasImageClass*)GTK_OBJECT_GET_CLASS(object)) +void +gevasimage_set_image_fill(GtkgEvasObj * object, double x, double y, double w, double h) +{ + return VTAB->set_image_fill( object, x, y, w, h ); +} +void +gevasimage_get_image_fill(GtkgEvasObj * object, double *x, double *y, double *w, double *h) +{ + return VTAB->get_image_fill( object, x, y, w, h ); +} +double +gevasimage_get_image_fill_width( GtkgEvasObj * object ) +{ + return VTAB->get_image_fill_width( object ); +} +double +gevasimage_get_image_fill_height(GtkgEvasObj * object ) +{ + return VTAB->get_image_fill_height( object ); +} + + + @@ -189,7 +211,11 @@ object_class->get_arg = gevasimage_get_arg; object_class->set_arg = gevasimage_set_arg; - klass->set_image_fill = gevasimage_set_image_fill; + klass->set_image_fill = set_image_fill; + klass->get_image_fill = get_image_fill; + klass->get_image_fill_width = get_image_fill_width; + klass->get_image_fill_height = get_image_fill_height; + klass->get_image_size = gevasimage_get_image_size; klass->set_image_border = gevasimage_set_image_border; klass->get_image_border = gevasimage_get_image_border; @@ -279,6 +305,7 @@ evas_object_image_fill_set( o, 0, 0, w, h ); evas_object_resize( o, w, h ); } + fprintf(stderr,"ARG_IMAGENAME(e2): %s %lx\n",gstr, EVAS(ev) ); } break; @@ -301,7 +328,7 @@ ev = GTK_GEVASIMAGE(object); { - Evas_Object* eo = evas_object_image_add( EVAS(ev) ); + Evas_Object* eo = GTK_GEVASOBJ(ev)->eobj; if( eo ) { gevasobj_get_location( GTK_GEVASOBJ(object), &x, &y ); @@ -316,8 +343,8 @@ Evas_Object* eo = evas_object_image_add( EVAS(ev) ); _gevas_set_obj( GTK_OBJECT(ev), eo); + gevasobj_resize( GTK_GEVASOBJ(ev), w, h ); // evas_object_resize( eo, w, h ); - evas_object_resize( eo, w, h ); evas_object_image_size_set( eo, w, h ); evas_object_image_data_set( eo, (int*)(rgbadata) ); evas_object_image_fill_set( eo, 0, 0, w, h ); @@ -539,22 +566,29 @@ return o; } -void gevasimage_ensure_smallerthan_with_ratio( GtkgEvasImage* gi, int desiredWidth ) +void gevasimage_ensure_smallerthan_with_ratio( GtkgEvasImage* gi, int MaxDesiredWidthOrHeight ) { int w=0, h=0; - double ratio = 0; + double ratio = MaxDesiredWidthOrHeight; GtkRequisition requisition; GtkgEvasObj* go = GTK_GEVASOBJ( gi ); gevasimage_get_image_size(go, &w, &h); - if( w && h && w > desiredWidth ) + if( w && h ) { - ratio = desiredWidth; - ratio /= w; - - w = desiredWidth; - h = (int)( ratio * h ); - + if( w > MaxDesiredWidthOrHeight ) + { + ratio /= w; + w = MaxDesiredWidthOrHeight; + h = (int)( ratio * h ); + } + else if( h > MaxDesiredWidthOrHeight ) + { + ratio /= h; + w = (int)( ratio * w ); + h = MaxDesiredWidthOrHeight; + } + gevasobj_resize( go, w, h ); gevasimage_set_image_fill( go, 0, 0, w, h ); } =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevasimage.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- gevasimage.h 17 Aug 2002 15:26:38 -0000 1.2 +++ gevasimage.h 26 Aug 2002 14:56:05 -0000 1.3 @@ -76,8 +76,12 @@ void (*set_image_fill) (GtkgEvasObj * object, double x, double y, double w, double h); + void (*get_image_fill) (GtkgEvasObj * object, double* x, double* y, + double* w, double* h); + double (*get_image_fill_width)( GtkgEvasObj * object ); + double (*get_image_fill_height)(GtkgEvasObj * object ); - void (*get_image_size) (GtkgEvasObj * object, int *w, int *h); + void (*get_image_size) (GtkgEvasObj * object, int *w, int *h); void (*set_image_border) (GtkgEvasObj * object, int l, int r, int t, int b); void (*get_image_border) (GtkgEvasObj * object, int *l, int *r, int *t, @@ -105,7 +109,13 @@ void gevasimage_set_image_size( GtkgEvasObj * object, int w, int h); void gevasimage_get_image_border(GtkgEvasObj * object, int *l, int *r, int *t, int *b); - void gevasimage_ensure_smallerthan_with_ratio( GtkgEvasImage* gi, int desiredWidth ); + + /** + * Scale the image so that both its width and height are smaller than + * MaxDesiredWidthOrHeight maintaining aspect ratio. + */ + void gevasimage_ensure_smallerthan_with_ratio( GtkgEvasImage* gi, + int MaxDesiredWidthOrHeight ); void gevasimage_load_from_rgba32data( GtkgEvasImage* gi, guint32* rgbadata, =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevasobj.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- gevasobj.c 20 Aug 2002 06:09:07 -0000 1.4 +++ gevasobj.c 26 Aug 2002 14:56:05 -0000 1.5 @@ -229,6 +229,7 @@ ev = GTK_GEVASOBJ(object); if (ev->eobj) { /* printf("FREE gevasobj:%d\n", (int) ev->eobj);*/ + evas_object_hide( ev->eobj ); evas_object_del( ev->eobj ); ev->eobj = NULL; } =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevasobj.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- gevasobj.h 20 Aug 2002 06:09:07 -0000 1.3 +++ gevasobj.h 26 Aug 2002 14:56:05 -0000 1.4 @@ -69,6 +69,11 @@ **/ void (*move) (GtkgEvasObj * object, double x, double y); + /** + * Ability to cache the original move function + */ + void (*original_move) (GtkgEvasObj * object, double x, double y); + }; struct _GtkgEvasObjClass { =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevastwin.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- gevastwin.c 20 Aug 2002 06:09:07 -0000 1.3 +++ gevastwin.c 26 Aug 2002 14:56:05 -0000 1.4 @@ -39,6 +39,8 @@ * a real app would not do this of course. */ +#include <stdio.h> + #include <gevasevh_selectable.h> #include <gevasevh_group_selector.h> @@ -146,7 +148,8 @@ static void gevastwin_init(GtkgEvasTwin * ev) { ev->mainobj = 0; - ev->auxobj = 0; + ev->auxobj = 0; + ev->sprite = 0; ev->ox = 0; ev->oy = 5; ev->ax = 0; @@ -156,16 +159,8 @@ GtkgEvasTwin *gevastwin_new() { GtkgEvasTwin *ev; - - ev = gtk_type_new(gevastwin_get_type()); - ev->mainobj = 0; - ev->auxobj = 0; - ev->ox = 0; - ev->oy = 5; - ev->ax = 0; - ev->ay = 1; - - return GTK_GEVASTWIN(ev); + ev = gtk_type_new(gevastwin_get_type()); + return GTK_GEVASTWIN(ev); } /* GtkObject functions */ @@ -195,7 +190,9 @@ gevasobj_get_geometry(ev->mainobj, &main_x, &main_y, &main_w, &main_h); if (obj == ev->auxobj) { - ev->aux_obj_move(ev->auxobj, main_x + (ev->ax?main_w:0) + ev->ox, main_y + (ev->ay?main_h:0) + ev->oy); +// ev->aux_obj_move(ev->auxobj, main_x + (ev->ax?main_w:0) + ev->ox, main_y + (ev->ay?main_h:0) + ev->oy); + + ev->aux_obj_move(ev->auxobj, main_x, main_y + main_h + 5); gevasobj_queue_redraw(ev->auxobj); } @@ -203,7 +200,9 @@ double ax = 0, ay = 0, ah = 0, aw = 0; gevasobj_get_geometry(ev->auxobj, &ax, &ay, &aw, &ah); - ev->main_obj_move(ev->mainobj, ax - (ev->ax?main_w:0) - ev->ox, ay - (ev->ay?main_h:0) - ev->oy); +// ev->main_obj_move(ev->mainobj, ax - (ev->ax?main_w:0) - ev->ox, ay - (ev->ay?main_h:0) - ev->oy); + + ev->main_obj_move(ev->mainobj, ax, ay - main_h - 5); gevasobj_queue_redraw(ev->mainobj); } } @@ -225,10 +224,65 @@ ev->aux_obj_move(object, x, y); _gevastwin_sync_obj(ev, ev->mainobj); } - } +#if 0 + else if( ev->sprite ) + { + /* The moved part of a sprite */ + if( gevas_obj_collection_contains( ev->sprite->col, GTK_GEVASOBJ(object) )) + { + if( GTK_GEVASOBJ(ev->sprite)->original_move ) + GTK_GEVASOBJ(ev->sprite)->original_move( ev->sprite, x, y ); + else + GTK_GEVASOBJ(ev->sprite)->move( ev->sprite, x, y ); + _gevastwin_sync_obj(ev, ev->auxobj); + } + } +#endif + } +} + +static void twin_object_resized( GtkgEvasObj* object, + double *w, + double *h, + gpointer user_data ) +{ + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_GEVASOBJ(object)); + g_return_if_fail(user_data != NULL); + g_return_if_fail(GTK_IS_GEVASTWIN(user_data)); + GtkgEvasTwin *ev = GTK_GEVASTWIN(user_data); + +// fprintf( stderr, "twin_object_resized(1) w:%f h:%f\n", *w, *h ); +// _gevastwin_sync_obj( ev, object ); +// fprintf( stderr, "twin_object_resized(1) w:%f h:%f\n", *w, *h ); } +/** + * Change the functionality of move() on objec 'o' to move the twin aswell. + */ +static void setup_object_movements( GtkObject * object, GtkgEvasObj* o ) +{ + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_GEVASTWIN(object)); + GtkgEvasTwin *ev = GTK_GEVASTWIN(object); + if( o == ev->mainobj ) + ev->main_obj_move = o->move; + if( o == ev->auxobj ) + ev->aux_obj_move = o->move; + + o->original_move = o->move; + o->move = _gevastwin_move_xxx; + gtk_object_set_data(GTK_OBJECT(o), GEVASTWIN_BACKWARD_LOOKUP_KEY, ev); +} + +static void sprite_item_add( + GtkgEvasObjCollection* col, + GtkgEvasObj* o, + GtkgEvasTwin* ev ) +{ + setup_object_movements( GTK_OBJECT(ev), o ); +} static void gevastwin_set_arg(GtkObject * object, GtkArg * arg, guint arg_id) { @@ -246,9 +300,32 @@ ev->main_obj_move = ev->mainobj->move; ev->mainobj->move = _gevastwin_move_xxx; - gtk_object_set_data(GTK_OBJECT(ev->mainobj), - GEVASTWIN_BACKWARD_LOOKUP_KEY, ev); - break; + gtk_object_set_data(GTK_OBJECT(ev->mainobj), GEVASTWIN_BACKWARD_LOOKUP_KEY, ev); + + gtk_signal_connect( GTK_OBJECT(ev->mainobj), "resize", + GTK_SIGNAL_FUNC(twin_object_resized), ev ); + + +/* if( GTK_IS_GEVAS_SPRITE( ev->mainobj ) ) */ +/* { */ +/* GtkgEvasSprite* sprite = GTK_GEVAS_SPRITE( ev->mainobj ); */ +/* ev->sprite = sprite; */ + +/* gtk_signal_connect( GTK_OBJECT(sprite->col), "add", */ +/* GTK_SIGNAL_FUNC(sprite_item_add), ev ); */ + +/* Evas_List* li=0; */ +/* for( li=sprite->col->selected_objs; li; li = li->next) */ +/* { */ +/* if(li->data) */ +/* { */ +/* setup_object_movements( GTK_OBJECT(ev), li->data ); */ +/* } */ +/* } */ +/* } */ + + + break; case ARG_AUXOBJ: ev->auxobj = GTK_VALUE_POINTER(*arg); @@ -256,9 +333,11 @@ ev->aux_obj_move = ev->auxobj->move; ev->auxobj->move = _gevastwin_move_xxx; _gevastwin_sync_obj(ev, ev->auxobj); - gtk_object_set_data(GTK_OBJECT(ev->auxobj), - GEVASTWIN_BACKWARD_LOOKUP_KEY, ev); - break; + gtk_object_set_data(GTK_OBJECT(ev->auxobj), GEVASTWIN_BACKWARD_LOOKUP_KEY, ev); + + gtk_signal_connect( GTK_OBJECT(ev->auxobj), "resize", + GTK_SIGNAL_FUNC(twin_object_resized), ev ); + break; case ARG_ALIGNX: ev->ax = GTK_VALUE_INT(*arg); =================================================================== RCS file: /cvsroot/enlightenment/misc/gevas2/src/gevastwin.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- gevastwin.h 20 Aug 2002 06:09:07 -0000 1.2 +++ gevastwin.h 26 Aug 2002 14:56:06 -0000 1.3 @@ -36,6 +36,7 @@ #include <gtk/gtkobject.h> #include "gevasobj.h" #include "gevas.h" +#include <gevas_sprite.h> #ifdef __cplusplus extern "C" { @@ -63,6 +64,7 @@ GtkgEvasObj *mainobj; GtkgEvasObj *auxobj; + GtkgEvasSprite* sprite; int ox,oy; int ax,ay; |