]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkkeys.c
GdkFrameClockIdle: don't start the tiemout/idle when in a frame
[~andy/gtk] / gdk / gdkkeys.c
index 779dfb506f9221a674377a0a0c63c43eb805bd61..6b46dbf7dfbac4355695bcbb2fb773c4d21ac339 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -378,6 +376,27 @@ gdk_keymap_get_num_lock_state (GdkKeymap *keymap)
   return GDK_KEYMAP_GET_CLASS (keymap)->get_num_lock_state (keymap);
 }
 
+/**
+ * gdk_keymap_get_modifier_state:
+ * @keymap: a #GdkKeymap
+ *
+ * Returns the current modifier state.
+ *
+ * Returns: the current modifier state.
+ *
+ * Since: 3.4
+ */
+guint
+gdk_keymap_get_modifier_state (GdkKeymap *keymap)
+{
+  g_return_val_if_fail (GDK_IS_KEYMAP (keymap), FALSE);
+
+  if (GDK_KEYMAP_GET_CLASS (keymap)->get_modifier_state)
+    return GDK_KEYMAP_GET_CLASS (keymap)->get_modifier_state (keymap);
+
+  return 0;
+}
+
 /**
  * gdk_keymap_get_entries_for_keyval:
  * @keymap: a #GdkKeymap
@@ -565,12 +584,11 @@ gdk_keymap_translate_keyboard_state (GdkKeymap       *keymap,
 /**
  * gdk_keymap_add_virtual_modifiers:
  * @keymap: a #GdkKeymap
- * @state: (out): pointer to the modifier mask to change
+ * @state: (inout): pointer to the modifier mask to change
  *
- * Adds virtual modifiers (i.e. Super, Hyper and Meta) which correspond
- * to the real modifiers (i.e Mod2, Mod3, ...) in @modifiers.
- * are set in @state to their non-virtual counterparts (i.e. Mod2,
- * Mod3,...) and set the corresponding bits in @state.
+ * Maps the non-virtual modifiers (i.e Mod2, Mod3, ...) which are set
+ * in @state to the virtual modifiers (i.e. Super, Hyper and Meta) and
+ * set the corresponding bits in @state.
  *
  * GDK already does this before delivering key events, but for
  * compatibility reasons, it only sets the first virtual modifier
@@ -593,7 +611,7 @@ gdk_keymap_add_virtual_modifiers (GdkKeymap       *keymap,
 /**
  * gdk_keymap_map_virtual_modifiers:
  * @keymap: a #GdkKeymap
- * @state: (out): pointer to the modifier state to map
+ * @state: (inout): pointer to the modifier state to map
  *
  * Maps the virtual modifiers (i.e. Super, Hyper and Meta) which
  * are set in @state to their non-virtual counterparts (i.e. Mod2,