gtk+ r22341 - in trunk: . gdk gdk/directfb



Author: neo
Date: Mon Feb 16 20:58:16 2009
New Revision: 22341
URL: http://svn.gnome.org/viewvc/gtk+?rev=22341&view=rev

Log:
2009-02-16  Sven Neumann  <sven gimp org>

	* gdk/gdk.symbols
	* gdk/directfb/gdkkeys-directfb.c: implement
	gdk_keymap_get_caps_lock_state(). No "state-changed" signal yet.



Modified:
   trunk/ChangeLog
   trunk/gdk/directfb/gdkkeys-directfb.c
   trunk/gdk/gdk.symbols

Modified: trunk/gdk/directfb/gdkkeys-directfb.c
==============================================================================
--- trunk/gdk/directfb/gdkkeys-directfb.c	(original)
+++ trunk/gdk/directfb/gdkkeys-directfb.c	Mon Feb 16 20:58:16 2009
@@ -1715,7 +1715,7 @@
 
 void
 gdk_directfb_translate_key_event (DFBWindowEvent *dfb_event,
-		GdkEventKey    *event)
+                                  GdkEventKey    *event)
 {
 	gint  len;
 	gchar buf[6];
@@ -1754,6 +1754,32 @@
 }
 
 /**
+ * gdk_keymap_get_caps_lock_state:
+ * @keymap: a #GdkKeymap
+ *
+ * Returns whether the Caps Lock modifer is locked.
+ *
+ * Returns: %TRUE if Caps Lock is on
+ *
+ * Since: 2.16
+ */
+gboolean
+gdk_keymap_get_caps_lock_state (GdkKeymap *keymap)
+{
+  IDirectFBInputDevice *keyboard = _gdk_display->keyboard;
+
+  if (keyboard)
+    {
+      DFBInputDeviceLockState  state;
+
+      if (keyboard->GetLockState (keyboard, &state) == DFB_OK)
+        return ((state & DILS_CAPS) != 0);
+    }
+
+  return FALSE;
+}
+
+/**
  * gdk_keymap_get_entries_for_keycode:
  * @keymap: a #GdkKeymap or %NULL to use the default keymap
  * @hardware_keycode: a keycode

Modified: trunk/gdk/gdk.symbols
==============================================================================
--- trunk/gdk/gdk.symbols	(original)
+++ trunk/gdk/gdk.symbols	Mon Feb 16 20:58:16 2009
@@ -846,6 +846,7 @@
 gdk_keymap_get_entries_for_keycode
 gdk_keymap_get_entries_for_keyval
 gdk_keymap_get_for_display
+gdk_keymap_get_caps_lock_state
 gdk_keymap_lookup_key
 gdk_keymap_translate_keyboard_state
 gdk_keyval_from_name



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