Re: keycode handling
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list gnome org
- Cc: hp redhat com
- Subject: Re: keycode handling
- Date: 03 Dec 2000 10:55:08 -0500
Havoc Pennington <hp redhat com> writes:
> gboolean gdk_keyval_get_keys (guint keyval,
> GdkKeyInfo **infos,
> gint *n_infos);
> guint gdk_key_info_to_keyval (const GdkKeyInfo *info);
> gboolean gdk_keycode_translate (guint hardware_keycode,
> GdkModifierType state,
> gint group,
> guint *keyval,
> gint *effective_group,
> gint *level,
> GdkModifierType *unused_modifiers);
> void gdk_keycode_get_map (guint hardware_keycode,
> GdkKeyInfo **infos,
> guint **keyvals,
> gint *n_entries);
It just occured to me, these are all things that need to become
per-display when we do that, so, instead, of adding these
now, and then adding a bunch of get_keys_for_display() style
functions later, we should probably make provisions. How
about:
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".
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]