[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: how to emit a GDK_MOTION_NOTIFY event?
From:       Clemens Kirchgatterer <clemens () root ! at>
Date:       1999-07-14 8:53:59
[Download RAW message or body]

John R Sheets wrote:
> 
> Clemens Kirchgatterer wrote:
> >
> > i have connected a signal handler to an gnome_canvas_item like this:
> >
> >   gtk_signal_connect(GTK_OBJECT(item),
> >                      "event",
> >                      (GtkSignalFunc)item_event,
> >                      NULL);
> >
> > now i want my programm to emit the GDK_MOTION_NOTIFY event, so the code
> > in my
> > event handler gets called.
> 
> Are you sure this is what you want to do?  Your program shouldn't
> need to artificially manufacture the motion notify event.  When
> you move the mouse across your application window, GDK (through
> X) will generate this event for you.  Your application only has
> to watch for it (via a callback).  Don't worry about triggering
> the event.  Just worry about catching it.

maybe i need to go into details a little bit ...
i'm coding a little editor for arranging canvas items (polygones
for now). the editor looks like "dia" so you can imagin what i'm
talking about. now, when you pick up an object an drag it around
with the mouse the scrollbars should scroll into the direction you
are actually moving, when you come close to the window edges.
this works just perfectly, but the only thing is that i don't get
motion notify events when i don't move the mouse in that
"autoscroll mode" (i'm just calling it this way). so the draged object
does'nt get repositioned until i generate an motion_notivy_event by
moving the mouse. by the way, the code that scrolls the window is
called in an gtk_timeout function.

so i think the simplest and most elegant way to solve this is emitting
that f*****g d**d signal. no code doubling no extra code.

someone in here who knows how this is done?
' hope so!


warm regards ...
clemens


-- 
         To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

	Mailing list concerns should be mailed to <listmaster@redhat.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic