GTK+ 2.0 Accelerator API


The current accelerator API in GTK+ HEAD is the same as in 1.2:
void       gtk_widget_add_accelerator     (GtkWidget      *widget,
                                           const gchar    *accel_signal,
                                           GtkAccelGroup  *accel_group,
                                           guint           accel_key,
                                           guint           accel_mods,
                                           GtkAccelFlags   accel_flags);
I think the bindings could use something like
void	gtk_widget_add_accelerator	(GtkWidget     *widget,
					 GtkAccelGroup *accel_group,
					 guint          accel_key,
					 guint		accel_mods,
					 GtkAccelFlags	accel_flags,
					 GClosure       closure);

that would allow binding an arbitary GClosure to a keyboard event.

If I am missing something altogether here, and it is required/desired that
accelerators only emit signals and only on the widget they are added to,
the current API is fine and only needs a GClosure added so you can pass
closure data to the callback.

But I am quite puzzled altogether on this accelerator issue, where can I
read about the GTK+ accelerator design?

A puzzled

   .--= ULLA! =---------------------.   `We are not here to give users what
   \     \   they want'  -- RMS, at GUADEC 2001
    `---= cactus cactus rulez org =---'
Sokan azért jönnek a tudás forrásához, hogy igyanak belôle...Én inkább csak gargarizálok.

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