1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = gdk3-Keyboard-Handling.html
27  * outPack = gdk
28  * outFile = Keymap
29  * strct   = GdkKeymap
30  * realStrct=
31  * ctorStrct=
32  * clss    = Keymap
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gdk_keymap_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- glib.Str
47  * 	- gdk.Display
48  * structWrap:
49  * 	- GdkDisplay* -> Display
50  * 	- GdkKeymap* -> Keymap
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module gdk.Keymap;
57 
58 public  import gtkc.gdktypes;
59 
60 private import gtkc.gdk;
61 private import glib.ConstructionException;
62 private import gobject.ObjectG;
63 
64 private import gobject.Signals;
65 public  import gtkc.gdktypes;
66 private import glib.Str;
67 private import gdk.Display;
68 
69 
70 private import gobject.ObjectG;
71 
72 /**
73  * Key values are the codes which are sent whenever a key is pressed or released.
74  * They appear in the GdkEventKey.keyval field of the
75  * GdkEventKey structure, which is passed to signal handlers for the
76  * "key-press-event" and "key-release-event" signals.
77  * The complete list of key values can be found in the
78  * <gdk/gdkkeysyms.h> header file.
79  *
80  * Key values are regularly updated from the upstream X.org X11 implementation,
81  * so new values are added regularly. They will be prefixed with GDK_KEY_ rather
82  * than XF86XK_ or XK_ (for older symbols).
83  *
84  * Key values can be converted into a string representation using
85  * gdk_keyval_name(). The reverse function, converting a string to a key value,
86  * is provided by gdk_keyval_from_name().
87  *
88  * The case of key values can be determined using gdk_keyval_is_upper() and
89  * gdk_keyval_is_lower(). Key values can be converted to upper or lower case
90  * using gdk_keyval_to_upper() and gdk_keyval_to_lower().
91  *
92  * When it makes sense, key values can be converted to and from
93  * Unicode characters with gdk_keyval_to_unicode() and gdk_unicode_to_keyval().
94  *
95  * One GdkKeymap object exists for each user display. gdk_keymap_get_default()
96  * returns the GdkKeymap for the default display; to obtain keymaps for other
97  * displays, use gdk_keymap_get_for_display(). A keymap
98  * is a mapping from GdkKeymapKey to key values. You can think of a GdkKeymapKey
99  * as a representation of a symbol printed on a physical keyboard key. That is, it
100  * contains three pieces of information. First, it contains the hardware keycode;
101  * this is an identifying number for a physical key. Second, it contains the
102  * level of the key. The level indicates which symbol on the
103  * key will be used, in a vertical direction. So on a standard US keyboard, the key
104  * with the number "1" on it also has the exclamation point ("!") character on
105  * it. The level indicates whether to use the "1" or the "!" symbol. The letter
106  * keys are considered to have a lowercase letter at level 0, and an uppercase
107  * letter at level 1, though only the uppercase letter is printed. Third, the
108  * GdkKeymapKey contains a group; groups are not used on standard US keyboards,
109  * but are used in many other countries. On a keyboard with groups, there can be 3
110  * or 4 symbols printed on a single key. The group indicates movement in a
111  * horizontal direction. Usually groups are used for two different languages. In
112  * group 0, a key might have two English characters, and in group 1 it might have
113  * two Hebrew characters. The Hebrew characters will be printed on the key next to
114  * the English characters.
115  *
116  * In order to use a keymap to interpret a key event, it's necessary to first
117  * convert the keyboard state into an effective group and level. This is done via a
118  * set of rules that varies widely according to type of keyboard and user
119  * configuration. The function gdk_keymap_translate_keyboard_state() accepts a
120  * keyboard state -- consisting of hardware keycode pressed, active modifiers, and
121  * active group -- applies the appropriate rules, and returns the group/level to be
122  * used to index the keymap, along with the modifiers which did not affect the
123  * group and level. i.e. it returns "unconsumed modifiers." The keyboard group may
124  * differ from the effective group used for keymap lookups because some keys don't
125  * have multiple groups - e.g. the Enter key is always in group 0 regardless of
126  * keyboard state.
127  *
128  * Note that gdk_keymap_translate_keyboard_state() also returns the keyval, i.e. it
129  * goes ahead and performs the keymap lookup in addition to telling you which
130  * effective group/level values were used for the lookup. GdkEventKey already
131  * contains this keyval, however, so you don't normally need to call
132  * gdk_keymap_translate_keyboard_state() just to get the keyval.
133  */
134 public class Keymap : ObjectG
135 {
136 	
137 	/** the main Gtk struct */
138 	protected GdkKeymap* gdkKeymap;
139 	
140 	
141 	/** Get the main Gtk struct */
142 	public GdkKeymap* getKeymapStruct()
143 	{
144 		return gdkKeymap;
145 	}
146 	
147 	
148 	/** the main Gtk struct as a void* */
149 	protected override void* getStruct()
150 	{
151 		return cast(void*)gdkKeymap;
152 	}
153 	
154 	/**
155 	 * Sets our main struct and passes it to the parent class
156 	 */
157 	public this (GdkKeymap* gdkKeymap)
158 	{
159 		super(cast(GObject*)gdkKeymap);
160 		this.gdkKeymap = gdkKeymap;
161 	}
162 	
163 	protected override void setStruct(GObject* obj)
164 	{
165 		super.setStruct(obj);
166 		gdkKeymap = cast(GdkKeymap*)obj;
167 	}
168 	
169 	/**
170 	 */
171 	int[string] connectedSignals;
172 	
173 	void delegate(Keymap)[] onDirectionChangedListeners;
174 	/**
175 	 * The ::direction-changed signal gets emitted when the direction of
176 	 * the keymap changes.
177 	 * Since 2.0
178 	 */
179 	void addOnDirectionChanged(void delegate(Keymap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
180 	{
181 		if ( !("direction-changed" in connectedSignals) )
182 		{
183 			Signals.connectData(
184 			getStruct(),
185 			"direction-changed",
186 			cast(GCallback)&callBackDirectionChanged,
187 			cast(void*)this,
188 			null,
189 			connectFlags);
190 			connectedSignals["direction-changed"] = 1;
191 		}
192 		onDirectionChangedListeners ~= dlg;
193 	}
194 	extern(C) static void callBackDirectionChanged(GdkKeymap* keymapStruct, Keymap _keymap)
195 	{
196 		foreach ( void delegate(Keymap) dlg ; _keymap.onDirectionChangedListeners )
197 		{
198 			dlg(_keymap);
199 		}
200 	}
201 	
202 	void delegate(Keymap)[] onKeysChangedListeners;
203 	/**
204 	 * The ::keys-changed signal is emitted when the mapping represented by
205 	 * keymap changes.
206 	 * Since 2.2
207 	 */
208 	void addOnKeysChanged(void delegate(Keymap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
209 	{
210 		if ( !("keys-changed" in connectedSignals) )
211 		{
212 			Signals.connectData(
213 			getStruct(),
214 			"keys-changed",
215 			cast(GCallback)&callBackKeysChanged,
216 			cast(void*)this,
217 			null,
218 			connectFlags);
219 			connectedSignals["keys-changed"] = 1;
220 		}
221 		onKeysChangedListeners ~= dlg;
222 	}
223 	extern(C) static void callBackKeysChanged(GdkKeymap* keymapStruct, Keymap _keymap)
224 	{
225 		foreach ( void delegate(Keymap) dlg ; _keymap.onKeysChangedListeners )
226 		{
227 			dlg(_keymap);
228 		}
229 	}
230 	
231 	void delegate(Keymap)[] onStateChangedListeners;
232 	/**
233 	 * The ::state-changed signal is emitted when the state of the
234 	 * keyboard changes, e.g when Caps Lock is turned on or off.
235 	 * See gdk_keymap_get_caps_lock_state().
236 	 * Since 2.16
237 	 */
238 	void addOnStateChanged(void delegate(Keymap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
239 	{
240 		if ( !("state-changed" in connectedSignals) )
241 		{
242 			Signals.connectData(
243 			getStruct(),
244 			"state-changed",
245 			cast(GCallback)&callBackStateChanged,
246 			cast(void*)this,
247 			null,
248 			connectFlags);
249 			connectedSignals["state-changed"] = 1;
250 		}
251 		onStateChangedListeners ~= dlg;
252 	}
253 	extern(C) static void callBackStateChanged(GdkKeymap* keymapStruct, Keymap _keymap)
254 	{
255 		foreach ( void delegate(Keymap) dlg ; _keymap.onStateChangedListeners )
256 		{
257 			dlg(_keymap);
258 		}
259 	}
260 	
261 	
262 	/**
263 	 * Returns the GdkKeymap attached to the default display.
264 	 * Returns: the GdkKeymap attached to the default display. [transfer none]
265 	 */
266 	public static Keymap getDefault()
267 	{
268 		// GdkKeymap * gdk_keymap_get_default (void);
269 		auto p = gdk_keymap_get_default();
270 		
271 		if(p is null)
272 		{
273 			return null;
274 		}
275 		
276 		return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) p);
277 	}
278 	
279 	/**
280 	 * Returns the GdkKeymap attached to display.
281 	 * Since 2.2
282 	 * Params:
283 	 * display = the GdkDisplay.
284 	 * Returns: the GdkKeymap attached to display. [transfer none]
285 	 */
286 	public static Keymap getForDisplay(Display display)
287 	{
288 		// GdkKeymap * gdk_keymap_get_for_display (GdkDisplay *display);
289 		auto p = gdk_keymap_get_for_display((display is null) ? null : display.getDisplayStruct());
290 		
291 		if(p is null)
292 		{
293 			return null;
294 		}
295 		
296 		return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) p);
297 	}
298 	
299 	/**
300 	 * Looks up the keyval mapped to a keycode/group/level triplet.
301 	 * If no keyval is bound to key, returns 0. For normal user input,
302 	 * you want to use gdk_keymap_translate_keyboard_state() instead of
303 	 * this function, since the effective group/level may not be
304 	 * the same as the current keyboard state.
305 	 * Params:
306 	 * key = a GdkKeymapKey with keycode, group, and level initialized
307 	 * Returns: a keyval, or 0 if none was mapped to the given key
308 	 */
309 	public uint lookupKey(out GdkKeymapKey key)
310 	{
311 		// guint gdk_keymap_lookup_key (GdkKeymap *keymap,  const GdkKeymapKey *key);
312 		return gdk_keymap_lookup_key(gdkKeymap, &key);
313 	}
314 	
315 	/**
316 	 * Translates the contents of a GdkEventKey into a keyval, effective
317 	 * group, and level. Modifiers that affected the translation and
318 	 * are thus unavailable for application use are returned in
319 	 * consumed_modifiers.
320 	 * See the section called “Description” for an explanation of
321 	 * groups and levels. The effective_group is the group that was
322 	 * actually used for the translation; some keys such as Enter are not
323 	 * affected by the active keyboard group. The level is derived from
324 	 * state. For convenience, GdkEventKey already contains the translated
325 	 * keyval, so this function isn't as useful as you might think.
326 	 * Note
327 	 * consumed_modifiers gives modifiers that should be masked out
328 	 * from state when comparing this key press to a hot key. For
329 	 * instance, on a US keyboard, the plus
330 	 * symbol is shifted, so when comparing a key press to a
331 	 * <Control>plus accelerator <Shift> should
332 	 * be masked out.
333 	 * $(DDOC_COMMENT example)
334 	 * An older interpretation consumed_modifiers was that it contained
335 	 * all modifiers that might affect the translation of the key;
336 	 * this allowed accelerators to be stored with irrelevant consumed
337 	 * Params:
338 	 * hardwareKeycode = a keycode
339 	 * state = a modifier state
340 	 * group = active keyboard group
341 	 * keyval = return location for keyval, or NULL. [out][allow-none]
342 	 * effectiveGroup = return location for effective
343 	 * group, or NULL. [out][allow-none]
344 	 * level = return location for level, or NULL. [out][allow-none]
345 	 * consumedModifiers = return location for modifiers
346 	 * that were used to determine the group or level, or NULL. [out][allow-none]
347 	 * Returns: TRUE if there was a keyval bound to the keycode/state/group
348 	 */
349 	public int translateKeyboardState(uint hardwareKeycode, GdkModifierType state, int group, out uint keyval, out int effectiveGroup, out int level, out GdkModifierType consumedModifiers)
350 	{
351 		// gboolean gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,  guint hardware_keycode,  GdkModifierType state,  gint group,  guint *keyval,  gint *effective_group,  gint *level,  GdkModifierType *consumed_modifiers);
352 		return gdk_keymap_translate_keyboard_state(gdkKeymap, hardwareKeycode, state, group, &keyval, &effectiveGroup, &level, &consumedModifiers);
353 	}
354 	
355 	/**
356 	 * Obtains a list of keycode/group/level combinations that will
357 	 * generate keyval. Groups and levels are two kinds of keyboard mode;
358 	 * in general, the level determines whether the top or bottom symbol
359 	 * on a key is used, and the group determines whether the left or
360 	 * right symbol is used. On US keyboards, the shift key changes the
361 	 * keyboard level, and there are no groups. A group switch key might
362 	 * convert a keyboard between Hebrew to English modes, for example.
363 	 * GdkEventKey contains a group field that indicates the active
364 	 * keyboard group. The level is computed from the modifier mask.
365 	 * The returned array should be freed
366 	 * with g_free().
367 	 * Params:
368 	 * keyval = a keyval, such as GDK_a, GDK_Up, GDK_Return, etc.
369 	 * keys = return location
370 	 * for an array of GdkKeymapKey. [out][array length=n_keys][transfer full]
371 	 * Returns: TRUE if keys were found and returned
372 	 */
373 	public int getEntriesForKeyval(uint keyval, out GdkKeymapKey[] keys)
374 	{
375 		// gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,  guint keyval,  GdkKeymapKey **keys,  gint *n_keys);
376 		GdkKeymapKey* outkeys = null;
377 		int nKeys;
378 		
379 		auto p = gdk_keymap_get_entries_for_keyval(gdkKeymap, keyval, &outkeys, &nKeys);
380 		
381 		keys = outkeys[0 .. nKeys];
382 		return p;
383 	}
384 	
385 	/**
386 	 * Returns the keyvals bound to hardware_keycode.
387 	 * The Nth GdkKeymapKey in keys is bound to the Nth
388 	 * keyval in keyvals. Free the returned arrays with g_free().
389 	 * When a keycode is pressed by the user, the keyval from
390 	 * this list of entries is selected by considering the effective
391 	 * keyboard group and level. See gdk_keymap_translate_keyboard_state().
392 	 * Params:
393 	 * hardwareKeycode = a keycode
394 	 * keys = return
395 	 * location for array of GdkKeymapKey, or NULL. [out][array length=n_entries][transfer full]
396 	 * keyvals = return
397 	 * location for array of keyvals, or NULL. [out][array length=n_entries][transfer full]
398 	 * Returns: TRUE if there were any entries
399 	 */
400 	public int getEntriesForKeycode(uint hardwareKeycode, out GdkKeymapKey[] keys, out uint[] keyvals)
401 	{
402 		// gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,  guint hardware_keycode,  GdkKeymapKey **keys,  guint **keyvals,  gint *n_entries);
403 		GdkKeymapKey* outkeys = null;
404 		guint* outkeyvals = null;
405 		int nEntries;
406 		
407 		auto p = gdk_keymap_get_entries_for_keycode(gdkKeymap, hardwareKeycode, &outkeys, &outkeyvals, &nEntries);
408 		
409 		keys = outkeys[0 .. nEntries];
410 		keyvals = outkeyvals[0 .. nEntries];
411 		return p;
412 	}
413 	
414 	/**
415 	 * Returns the direction of effective layout of the keymap.
416 	 * Returns: PANGO_DIRECTION_LTR or PANGO_DIRECTION_RTL if it can determine the direction. PANGO_DIRECTION_NEUTRAL otherwise.
417 	 */
418 	public PangoDirection getDirection()
419 	{
420 		// PangoDirection gdk_keymap_get_direction (GdkKeymap *keymap);
421 		return gdk_keymap_get_direction(gdkKeymap);
422 	}
423 	
424 	/**
425 	 * Determines if keyboard layouts for both right-to-left and left-to-right
426 	 * languages are in use.
427 	 * Since 2.12
428 	 * Returns: TRUE if there are layouts in both directions, FALSE otherwise
429 	 */
430 	public int haveBidiLayouts()
431 	{
432 		// gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap);
433 		return gdk_keymap_have_bidi_layouts(gdkKeymap);
434 	}
435 	
436 	/**
437 	 * Returns whether the Caps Lock modifer is locked.
438 	 * Since 2.16
439 	 * Returns: TRUE if Caps Lock is on
440 	 */
441 	public int getCapsLockState()
442 	{
443 		// gboolean gdk_keymap_get_caps_lock_state (GdkKeymap *keymap);
444 		return gdk_keymap_get_caps_lock_state(gdkKeymap);
445 	}
446 	
447 	/**
448 	 * Returns whether the Num Lock modifer is locked.
449 	 * Returns: TRUE if Num Lock is on Since 3.0
450 	 */
451 	public int getNumLockState()
452 	{
453 		// gboolean gdk_keymap_get_num_lock_state (GdkKeymap *keymap);
454 		return gdk_keymap_get_num_lock_state(gdkKeymap);
455 	}
456 	
457 	/**
458 	 * Returns the current modifier state.
459 	 * Returns: the current modifier state. Since 3.4
460 	 */
461 	public uint getModifierState()
462 	{
463 		// guint gdk_keymap_get_modifier_state (GdkKeymap *keymap);
464 		return gdk_keymap_get_modifier_state(gdkKeymap);
465 	}
466 	
467 	/**
468 	 * Maps the non-virtual modifiers (i.e Mod2, Mod3, ...) which are set
469 	 * in state to the virtual modifiers (i.e. Super, Hyper and Meta) and
470 	 * set the corresponding bits in state.
471 	 * GDK already does this before delivering key events, but for
472 	 * compatibility reasons, it only sets the first virtual modifier
473 	 * it finds, whereas this function sets all matching virtual modifiers.
474 	 * This function is useful when matching key events against
475 	 * accelerators.
476 	 * Since 2.20
477 	 * Params:
478 	 * state = pointer to the modifier mask to change. [inout]
479 	 */
480 	public void addVirtualModifiers(ref GdkModifierType state)
481 	{
482 		// void gdk_keymap_add_virtual_modifiers (GdkKeymap *keymap,  GdkModifierType *state);
483 		gdk_keymap_add_virtual_modifiers(gdkKeymap, &state);
484 	}
485 	
486 	/**
487 	 * Maps the virtual modifiers (i.e. Super, Hyper and Meta) which
488 	 * are set in state to their non-virtual counterparts (i.e. Mod2,
489 	 * Mod3,...) and set the corresponding bits in state.
490 	 * This function is useful when matching key events against
491 	 * accelerators.
492 	 * Since 2.20
493 	 * Params:
494 	 * state = pointer to the modifier state to map. [inout]
495 	 * Returns: TRUE if no virtual modifiers were mapped to the same non-virtual modifier. Note that FALSE is also returned if a virtual modifier is mapped to a non-virtual modifier that was already set in state.
496 	 */
497 	public int mapVirtualModifiers(ref GdkModifierType state)
498 	{
499 		// gboolean gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,  GdkModifierType *state);
500 		return gdk_keymap_map_virtual_modifiers(gdkKeymap, &state);
501 	}
502 	
503 	/**
504 	 * Returns the modifier mask the keymap's windowing system backend
505 	 * uses for a particular purpose.
506 	 * Note that this function always returns real hardware modifiers, not
507 	 * virtual ones (e.g. it will return GDK_MOD1_MASK rather than
508 	 * GDK_META_MASK if the backend maps MOD1 to META), so there are use
509 	 * cases where the return value of this function has to be transformed
510 	 * by gdk_keymap_add_virtual_modifiers() in order to contain the
511 	 * expected result.
512 	 * Params:
513 	 * intent = the use case for the modifier mask
514 	 * Returns: the modifier mask used for intent. Since 3.4
515 	 */
516 	public GdkModifierType getModifierMask(GdkModifierIntent intent)
517 	{
518 		// GdkModifierType gdk_keymap_get_modifier_mask (GdkKeymap *keymap,  GdkModifierIntent intent);
519 		return gdk_keymap_get_modifier_mask(gdkKeymap, intent);
520 	}
521 	
522 	/**
523 	 * Converts a key value into a symbolic name.
524 	 * The names are the same as those in the
525 	 * <gdk/gdkkeysyms.h> header file
526 	 * but without the leading "GDK_KEY_".
527 	 * Params:
528 	 * keyval = a key value
529 	 * Returns: a string containing the name of the key, or NULL if keyval is not a valid key. The string should not be modified. [transfer none]
530 	 */
531 	public static string gdkKeyvalName(uint keyval)
532 	{
533 		// gchar * gdk_keyval_name (guint keyval);
534 		return Str.toString(gdk_keyval_name(keyval));
535 	}
536 	
537 	/**
538 	 * Converts a key name to a key value.
539 	 * The names are the same as those in the
540 	 * <gdk/gdkkeysyms.h> header file
541 	 * but without the leading "GDK_KEY_".
542 	 * Params:
543 	 * keyvalName = a key name
544 	 * Returns: the corresponding key value, or GDK_KEY_VoidSymbol if the key name is not a valid key
545 	 */
546 	public static uint gdkKeyvalFromName(string keyvalName)
547 	{
548 		// guint gdk_keyval_from_name (const gchar *keyval_name);
549 		return gdk_keyval_from_name(Str.toStringz(keyvalName));
550 	}
551 	
552 	/**
553 	 * Obtains the upper- and lower-case versions of the keyval symbol.
554 	 * Examples of keyvals are GDK_KEY_a, GDK_KEY_Enter, GDK_KEY_F1, etc.
555 	 * Params:
556 	 * symbol = a keyval
557 	 * lower = return location for lowercase version of symbol. [out]
558 	 * upper = return location for uppercase version of symbol. [out]
559 	 */
560 	public static void gdkKeyvalConvertCase(uint symbol, out uint lower, out uint upper)
561 	{
562 		// void gdk_keyval_convert_case (guint symbol,  guint *lower,  guint *upper);
563 		gdk_keyval_convert_case(symbol, &lower, &upper);
564 	}
565 	
566 	/**
567 	 * Converts a key value to upper case, if applicable.
568 	 * Params:
569 	 * keyval = a key value.
570 	 * Returns: the upper case form of keyval, or keyval itself if it is already in upper case or it is not subject to case conversion.
571 	 */
572 	public static uint gdkKeyvalToUpper(uint keyval)
573 	{
574 		// guint gdk_keyval_to_upper (guint keyval);
575 		return gdk_keyval_to_upper(keyval);
576 	}
577 	
578 	/**
579 	 * Converts a key value to lower case, if applicable.
580 	 * Params:
581 	 * keyval = a key value.
582 	 * Returns: the lower case form of keyval, or keyval itself if it is already in lower case or it is not subject to case conversion.
583 	 */
584 	public static uint gdkKeyvalToLower(uint keyval)
585 	{
586 		// guint gdk_keyval_to_lower (guint keyval);
587 		return gdk_keyval_to_lower(keyval);
588 	}
589 	
590 	/**
591 	 * Returns TRUE if the given key value is in upper case.
592 	 * Params:
593 	 * keyval = a key value.
594 	 * Returns: TRUE if keyval is in upper case, or if keyval is not subject to case conversion.
595 	 */
596 	public static int gdkKeyvalIsUpper(uint keyval)
597 	{
598 		// gboolean gdk_keyval_is_upper (guint keyval);
599 		return gdk_keyval_is_upper(keyval);
600 	}
601 	
602 	/**
603 	 * Returns TRUE if the given key value is in lower case.
604 	 * Params:
605 	 * keyval = a key value.
606 	 * Returns: TRUE if keyval is in lower case, or if keyval is not subject to case conversion.
607 	 */
608 	public static int gdkKeyvalIsLower(uint keyval)
609 	{
610 		// gboolean gdk_keyval_is_lower (guint keyval);
611 		return gdk_keyval_is_lower(keyval);
612 	}
613 	
614 	/**
615 	 * Convert from a GDK key symbol to the corresponding ISO10646 (Unicode)
616 	 * character.
617 	 * Params:
618 	 * keyval = a GDK key symbol
619 	 * Returns: the corresponding unicode character, or 0 if there is no corresponding character.
620 	 */
621 	public static uint gdkKeyvalToUnicode(uint keyval)
622 	{
623 		// guint32 gdk_keyval_to_unicode (guint keyval);
624 		return gdk_keyval_to_unicode(keyval);
625 	}
626 	
627 	/**
628 	 * Convert from a ISO10646 character to a key symbol.
629 	 * Since 2.0
630 	 * Params:
631 	 * wc = a ISO10646 encoded character
632 	 * Returns: the corresponding GDK key symbol, if one exists. or, if there is no corresponding symbol, wc | 0x01000000 Signal Details The "direction-changed" signal void user_function (GdkKeymap *keymap, gpointer user_data) : Run Last The ::direction-changed signal gets emitted when the direction of the keymap changes.
633 	 */
634 	public static uint gdkUnicodeToKeyval(uint wc)
635 	{
636 		// guint gdk_unicode_to_keyval (guint32 wc);
637 		return gdk_unicode_to_keyval(wc);
638 	}
639 }