mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
gdk: Make GdkKeymap a private api
We have replacement apis in GdkDevice and GdkDisplay.
This commit is contained in:
parent
0eb728aa51
commit
89ad7893ad
@ -98,7 +98,6 @@ gdk_display_get_monitor_at_surface
|
||||
gdk_display_get_clipboard
|
||||
gdk_display_get_primary_clipboard
|
||||
gdk_display_get_setting
|
||||
gdk_display_get_keymap
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_display_map_keyval
|
||||
@ -341,49 +340,16 @@ gdk_rectangle_get_type
|
||||
<SECTION>
|
||||
<TITLE>Keyboard Handling</TITLE>
|
||||
<FILE>keys</FILE>
|
||||
GdkKeymap
|
||||
GdkKeymapKey
|
||||
gdk_keymap_lookup_key
|
||||
gdk_keymap_translate_keyboard_state
|
||||
gdk_keymap_get_entries_for_keyval
|
||||
gdk_keymap_get_entries_for_keycode
|
||||
gdk_keymap_get_direction
|
||||
gdk_keymap_have_bidi_layouts
|
||||
gdk_keymap_get_caps_lock_state
|
||||
gdk_keymap_get_num_lock_state
|
||||
gdk_keymap_get_scroll_lock_state
|
||||
gdk_keymap_get_modifier_state
|
||||
gdk_keymap_add_virtual_modifiers
|
||||
gdk_keymap_map_virtual_modifiers
|
||||
gdk_keymap_get_modifier_mask
|
||||
gdk_keymap_get_display
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_name
|
||||
gdk_keyval_from_name
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_convert_case
|
||||
gdk_keyval_to_upper
|
||||
gdk_keyval_to_lower
|
||||
gdk_keyval_is_upper
|
||||
gdk_keyval_is_lower
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_to_unicode
|
||||
gdk_unicode_to_keyval
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_KEYMAP
|
||||
GDK_IS_KEYMAP
|
||||
GDK_TYPE_KEYMAP
|
||||
GDK_KEYMAP_CLASS
|
||||
GDK_IS_KEYMAP_CLASS
|
||||
GDK_KEYMAP_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkKeymapClass
|
||||
gdk_keymap_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -17,7 +17,6 @@ gdk_event_get_type
|
||||
gdk_frame_clock_get_type
|
||||
gdk_gl_context_get_type
|
||||
gdk_gl_texture_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_memory_texture_get_type
|
||||
gdk_monitor_get_type
|
||||
gdk_paintable_get_type
|
||||
|
@ -32,7 +32,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDrag, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkDrawContext, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkFrameClock, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkGLContext, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkKeymap, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkSeat, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkPopupLayout, gdk_popup_layout_unref)
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkintl.h"
|
||||
#include "gdkkeys.h"
|
||||
#include "gdkkeysprivate.h"
|
||||
|
||||
/* for the use of round() */
|
||||
#include "fallback-c89.c"
|
||||
|
@ -115,9 +115,6 @@ GDK_AVAILABLE_IN_ALL
|
||||
GdkMonitor * gdk_display_get_monitor_at_surface (GdkDisplay *display,
|
||||
GdkSurface *surface);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkKeymap * gdk_display_get_keymap (GdkDisplay *display);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkModifierType gdk_display_get_modifier_mask (GdkDisplay *display,
|
||||
GdkModifierIntent intent);
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkdragprivate.h"
|
||||
#include "gdkdropprivate.h"
|
||||
#include "gdkkeysprivate.h"
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <string.h>
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "gdksurfaceprivate.h"
|
||||
#include "gdkenumtypes.h"
|
||||
#include "gdkdragprivate.h"
|
||||
#include "gdkkeysprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -322,6 +323,7 @@ void gdk_seat_ungrab (GdkSeat *seat);
|
||||
GdkSurface * gdk_surface_new_temp (GdkDisplay *display,
|
||||
const GdkRectangle *position);
|
||||
|
||||
GdkKeymap * gdk_display_get_keymap (GdkDisplay *display);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -34,77 +34,6 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define GDK_TYPE_KEYMAP (gdk_keymap_get_type ())
|
||||
#define GDK_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_KEYMAP, GdkKeymap))
|
||||
#define GDK_IS_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_KEYMAP))
|
||||
|
||||
/**
|
||||
* GdkKeymap:
|
||||
*
|
||||
* A #GdkKeymap defines the translation from keyboard state
|
||||
* (including a hardware key, a modifier mask, and active keyboard group)
|
||||
* to a keyval. This translation has two phases. The first phase is
|
||||
* to determine the effective keyboard group and level for the keyboard
|
||||
* state; the second phase is to look up the keycode/group/level triplet
|
||||
* in the keymap and see what keyval it corresponds to.
|
||||
*/
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_keymap_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkDisplay * gdk_keymap_get_display (GdkKeymap *keymap);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
guint gdk_keymap_lookup_key (GdkKeymap *keymap,
|
||||
const GdkKeymapKey *key);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
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);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
guint keyval,
|
||||
GdkKeymapKey **keys,
|
||||
gint *n_keys);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
PangoDirection gdk_keymap_get_direction (GdkKeymap *keymap);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_get_caps_lock_state (GdkKeymap *keymap);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_get_num_lock_state (GdkKeymap *keymap);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_get_scroll_lock_state (GdkKeymap *keymap);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
guint gdk_keymap_get_modifier_state (GdkKeymap *keymap);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_keymap_add_virtual_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType *state);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType *state);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkModifierType gdk_keymap_get_modifier_mask (GdkKeymap *keymap,
|
||||
GdkModifierIntent intent);
|
||||
|
||||
|
||||
/* Key values
|
||||
*/
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const char *gdk_keyval_name (guint keyval) G_GNUC_CONST;
|
||||
|
||||
|
@ -22,10 +22,14 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GDK_TYPE_KEYMAP (gdk_keymap_get_type ())
|
||||
#define GDK_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_KEYMAP, GdkKeymap))
|
||||
#define GDK_IS_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_KEYMAP))
|
||||
#define GDK_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_KEYMAP, GdkKeymapClass))
|
||||
#define GDK_IS_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_KEYMAP))
|
||||
#define GDK_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_KEYMAP, GdkKeymapClass))
|
||||
|
||||
typedef struct _GdkKeymap GdkKeymap;
|
||||
typedef struct _GdkKeymapClass GdkKeymapClass;
|
||||
|
||||
struct _GdkKeymapClass
|
||||
@ -77,6 +81,43 @@ struct _GdkKeymap
|
||||
GdkDisplay *display;
|
||||
};
|
||||
|
||||
GType gdk_keymap_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GdkDisplay * gdk_keymap_get_display (GdkKeymap *keymap);
|
||||
|
||||
guint gdk_keymap_lookup_key (GdkKeymap *keymap,
|
||||
const GdkKeymapKey *key);
|
||||
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);
|
||||
gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
guint keyval,
|
||||
GdkKeymapKey **keys,
|
||||
gint *n_keys);
|
||||
gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries);
|
||||
|
||||
PangoDirection gdk_keymap_get_direction (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_get_caps_lock_state (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_get_num_lock_state (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_get_scroll_lock_state (GdkKeymap *keymap);
|
||||
guint gdk_keymap_get_modifier_state (GdkKeymap *keymap);
|
||||
void gdk_keymap_add_virtual_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType *state);
|
||||
gboolean gdk_keymap_map_virtual_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType *state);
|
||||
GdkModifierType gdk_keymap_get_modifier_mask (GdkKeymap *keymap,
|
||||
GdkModifierIntent intent);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -122,7 +122,6 @@ typedef struct _GdkClipboard GdkClipboard;
|
||||
typedef struct _GdkDisplayManager GdkDisplayManager;
|
||||
typedef struct _GdkDisplay GdkDisplay;
|
||||
typedef struct _GdkSurface GdkSurface;
|
||||
typedef struct _GdkKeymap GdkKeymap;
|
||||
typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
|
||||
typedef struct _GdkSeat GdkSeat;
|
||||
typedef struct _GdkSnapshot GdkSnapshot;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gdkseat-wayland.h"
|
||||
#include "gdkwayland.h"
|
||||
#include "gdkkeysyms.h"
|
||||
#include "gdkkeysprivate.h"
|
||||
#include "gdkcursorprivate.h"
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkdevicepadprivate.h"
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <gdk/win32/gdkwin32display.h>
|
||||
#include <gdk/win32/gdkwin32displaymanager.h>
|
||||
#include <gdk/win32/gdkwin32dnd.h>
|
||||
#include <gdk/win32/gdkwin32keys.h>
|
||||
#include <gdk/win32/gdkwin32screen.h>
|
||||
#include <gdk/win32/gdkwin32surface.h>
|
||||
#include <gdk/win32/gdkwin32misc.h>
|
||||
|
@ -23,6 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include "gdkkeysprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -58,10 +59,8 @@ typedef struct _GdkWin32KeymapClass GdkWin32KeymapClass;
|
||||
#define GDK_IS_WIN32_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WIN32_KEYMAP))
|
||||
#define GDK_WIN32_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WIN32_KEYMAP, GdkWin32KeymapClass))
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_win32_keymap_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkWin32KeymapMatch gdk_win32_keymap_check_compose (GdkWin32Keymap *keymap,
|
||||
guint16 *compose_buffer,
|
||||
gsize compose_buffer_len,
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "gdkx11devicemanager-xi2.h"
|
||||
#include "gdkx11device-xi2.h"
|
||||
#include "gdkx11keys.h"
|
||||
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkdevicetoolprivate.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "gdkdisplay-x11.h"
|
||||
#include "gdkdisplayprivate.h"
|
||||
#include "gdkx11keys.h"
|
||||
|
||||
#include "gdkasync.h"
|
||||
#include "gdkdisplay.h"
|
||||
|
@ -27,7 +27,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11DeviceXI2, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Display, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Drag, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11GLContext, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Surface, g_object_unref)
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <gdk/x11/gdkx11display.h>
|
||||
#include <gdk/x11/gdkx11dnd.h>
|
||||
#include <gdk/x11/gdkx11glcontext.h>
|
||||
#include <gdk/x11/gdkx11keys.h>
|
||||
#include <gdk/x11/gdkx11monitor.h>
|
||||
#include <gdk/x11/gdkx11property.h>
|
||||
#include <gdk/x11/gdkx11screen.h>
|
||||
|
@ -23,6 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkkeysprivate.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@ -43,11 +44,9 @@ typedef struct _GdkX11KeymapClass GdkX11KeymapClass;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_x11_keymap_get_type (void);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_x11_keymap_get_group_for_state (GdkKeymap *keymap,
|
||||
guint state);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap,
|
||||
guint keycode);
|
||||
G_END_DECLS
|
||||
|
@ -41,7 +41,6 @@ gdk_x11_public_headers = files([
|
||||
'gdkx11display.h',
|
||||
'gdkx11dnd.h',
|
||||
'gdkx11glcontext.h',
|
||||
'gdkx11keys.h',
|
||||
'gdkx11monitor.h',
|
||||
'gdkx11property.h',
|
||||
'gdkx11screen.h',
|
||||
|
Loading…
Reference in New Issue
Block a user