Re: keycode handling



Havoc Pennington <hp redhat com> writes:

> Owen Taylor <otaylor redhat com> writes: 
> > GdkKeymap *gdk_get_keymap               ();
> > gboolean   gdk_keymap_keyval_to_keys    (GdkKeymap         *keymap,
> > 					 guint              keyval,
> > 					 GdkKeyInfo       **infos,
> > 					 gint              *n_infos);
> > guint      gdk_keymap_info_to_keyval    (GdkKeymap         *keymap,
> > 					 const GdkKeyInfo  *info);
> > gboolean   gdk_keymap_translate_keycode (GdkKeymap         *keymap,
> > 					 guint              hardware_keycode,
> > 					 GdkModifierType    state,
> > 					 gint               group,
> > 					 guint             *keyval,
> > 					 gint              *effective_group,
> > 					 gint              *level,
> > 					 GdkModifierType   *unused_modifiers);
> > void       gdk_keymap_keycode_to_keys   (GdkKeymap         *keymap,
> >                                          guint              hardware_keycode,
> > 					 GdkKeyInfo       **infos,
> > 					 guint            **keyvals,
> > 					 gint              *n_entries);
> > 
> > And then, as a convenience to C programmers, allow all the functions
> > to take NULL for the keymap to mean "default keymap".
> > 
> 
> Sure, trivial to do. Makes the function names nicer too.

I had another thought (I need to stop that...) - we probably need to make
GdkKeymap a GObject and have a ::changed signal on it. Otherwise
we are giving people the option of being inherently inefficient
or inherently broken.

Regards,
                                        Owen





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