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