Re: (no subject)



Loban Rahman wrote:

> Question:
> Is it possible to set an event mask on a GnomeCanvasItem? If so, how?
> For any GtkWidget, I'd use the gtk_widget_set_events() function on it.
> But GnomeCanvasItem derives directly from GtkObject. I tried using the
> gtk_widget_set_events() function on the GnomeCanvas itself, but that
> didn't work. For now I'm just manually filtering events myself by
> checking the type field, but it's kludgy.

The gnome-canvas docs have 2 functions that should do what you want:

int         gnome_canvas_item_grab          (GnomeCanvasItem *item,
                                               unsigned int event_mask,
                                               GdkCursor *cursor,
                                               guint32 etime);
void        gnome_canvas_item_ungrab        (GnomeCanvasItem *item,
                                               guint32 etime);

AFAIK GtkWidgets and CanvasItems don't share any properties, so
GtkWidget-functions don't work on CanvasItems. CanvasItems implement
their own functions.

Greetings
FF





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]