File indexing completed on 2024-11-24 05:00:23

0001 /*
0002     GDK - The GIMP Drawing Kit
0003     SPDX-FileCopyrightText: 1995-1997 Peter Mattis
0004     SPDX-FileCopyrightText: 1995-1997 Spencer Kimball
0005     SPDX-FileCopyrightText: 1995-1997 Josh MacDonald
0006     SPDX-FileCopyrightText: 2005, 2006, 2007, 2009 GNOME Foundation
0007 
0008     SPDX-License-Identifier: LGPL-2.0-or-later
0009 */
0010 #pragma once
0011 
0012 #include <glib.h>
0013 
0014 G_BEGIN_DECLS
0015 
0016 typedef enum {
0017     GDK_SHIFT_MASK = 1 << 0,
0018     GDK_LOCK_MASK = 1 << 1,
0019     GDK_CONTROL_MASK = 1 << 2,
0020     GDK_MOD1_MASK = 1 << 3,
0021     GDK_MOD2_MASK = 1 << 4,
0022     GDK_MOD3_MASK = 1 << 5,
0023     GDK_MOD4_MASK = 1 << 6,
0024     GDK_MOD5_MASK = 1 << 7,
0025     GDK_BUTTON1_MASK = 1 << 8,
0026     GDK_BUTTON2_MASK = 1 << 9,
0027     GDK_BUTTON3_MASK = 1 << 10,
0028     GDK_BUTTON4_MASK = 1 << 11,
0029     GDK_BUTTON5_MASK = 1 << 12,
0030 
0031     GDK_MODIFIER_RESERVED_13_MASK = 1 << 13,
0032     GDK_MODIFIER_RESERVED_14_MASK = 1 << 14,
0033     GDK_MODIFIER_RESERVED_15_MASK = 1 << 15,
0034     GDK_MODIFIER_RESERVED_16_MASK = 1 << 16,
0035     GDK_MODIFIER_RESERVED_17_MASK = 1 << 17,
0036     GDK_MODIFIER_RESERVED_18_MASK = 1 << 18,
0037     GDK_MODIFIER_RESERVED_19_MASK = 1 << 19,
0038     GDK_MODIFIER_RESERVED_20_MASK = 1 << 20,
0039     GDK_MODIFIER_RESERVED_21_MASK = 1 << 21,
0040     GDK_MODIFIER_RESERVED_22_MASK = 1 << 22,
0041     GDK_MODIFIER_RESERVED_23_MASK = 1 << 23,
0042     GDK_MODIFIER_RESERVED_24_MASK = 1 << 24,
0043     GDK_MODIFIER_RESERVED_25_MASK = 1 << 25,
0044 
0045     /* The next few modifiers are used by XKB, so we skip to the end.
0046      * Bits 15 - 25 are currently unused. Bit 29 is used internally.
0047      */
0048 
0049     GDK_SUPER_MASK = 1 << 26,
0050     GDK_HYPER_MASK = 1 << 27,
0051     GDK_META_MASK = 1 << 28,
0052 
0053     GDK_MODIFIER_RESERVED_29_MASK = 1 << 29,
0054 
0055     GDK_RELEASE_MASK = 1 << 30,
0056 
0057     /* Combination of GDK_SHIFT_MASK..GDK_BUTTON5_MASK + GDK_SUPER_MASK
0058        + GDK_HYPER_MASK + GDK_META_MASK + GDK_RELEASE_MASK */
0059     GDK_MODIFIER_MASK = 0x5c001fff
0060 } GdkModifierType;
0061 
0062 void _gtk_accelerator_parse(const gchar *accelerator, guint *accelerator_key, GdkModifierType *accelerator_mods);
0063 
0064 G_END_DECLS