|  |  |  | Gtk Hotkey Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
| GtkHotkeyListenerGtkHotkeyListener — Abstract base class providing platform independent hotkey listening capabilities | 
                    GtkHotkeyListener;
enum                GtkHotkeyListenerError;
#define             GTK_HOTKEY_LISTENER_ERROR
GtkHotkeyListener*  gtk_hotkey_listener_get_default     (void);
void                gtk_hotkey_listener_activated       (GtkHotkeyListener *self,
                                                         GtkHotkeyInfo *hotkey,
                                                         guint event_time);
gboolean            gtk_hotkey_listener_bind_hotkey     (GtkHotkeyListener *self,
                                                         GtkHotkeyInfo *hotkey,
                                                         GError **error);
gboolean            gtk_hotkey_listener_unbind_hotkey   (GtkHotkeyListener *self,
                                                         GtkHotkeyInfo *hotkey,
                                                         GError **error);
GtkHotkeyListener is an abstract base class for implementing platform specific hotkey listeners - ie objects able to register when the user enters a certain keyboard combination, regardless of which window has focus.
Unless you have very special needs you should use the factory method
gtk_hotkey_listener_get_default() to get a reference to a GtkHotkeyListener
matching your platform. Although most applications will not need.
This class is part of the advanced API of GtkHotkey. Applications will not
normally use a GtkHotkeyListener directly, since gtk_hotkey_info_bind()
will call into gtk_hotkey_listener_bind() on the default listener for you.
typedef enum
{
	GTK_HOTKEY_LISTENER_ERROR_BIND,
	GTK_HOTKEY_LISTENER_ERROR_UNBIND,
} GtkHotkeyListenerError;
Error codes for GErrors related to GtkHotkeyListeners
#define GTK_HOTKEY_LISTENER_ERROR gtk_hotkey_listener_error_quark()
Error domain for GtkHotkeyListener.
GtkHotkeyListener* gtk_hotkey_listener_get_default (void);
Static factory method to get a reference to the default GtkHotkeyListener for the current platform.
FIXME: Currently hardcoded to X11
| Returns : | A new reference to the default hotkey listener for the platform | 
void gtk_hotkey_listener_activated (GtkHotkeyListener *self, GtkHotkeyInfo *hotkey, guint event_time);
Emit the "activated" signal on a hotkey listener.
| 
 | GtkHotkeyListener to emit the "activated" signal | 
| 
 | The GtkHotkeyInfo the event happened for | 
| 
 | The system time the event happened on. This is useful for applications to pass through focus stealing prevention when mapping windows | 
gboolean gtk_hotkey_listener_bind_hotkey (GtkHotkeyListener *self, GtkHotkeyInfo *hotkey, GError **error);
This method must be implemented by any child class of GtkHotkeyListener.
Start listening for keypresses matching the signature of hotkey.
This method is notmally accessed indirectly by calling gtk_hotkey_info_bind().
| 
 | The hotkey listener on which to bind a hotkey | 
| 
 | The GtkHotkeyInfo to bind. See "signature" | 
| 
 | GError in which to store errors, or NULLto ignore | 
| Returns : | TRUEif the binding succeeded, orFALSEotherwise. In case of
          runtime errorserrorwill be set | 
gboolean gtk_hotkey_listener_unbind_hotkey (GtkHotkeyListener *self, GtkHotkeyInfo *hotkey, GError **error);
This method must be implemented by any child class of GtkHotkeyListener.
Stop listening for keypresses matching the signature of hotkey.  This method
is notmally accessed indirectly by calling gtk_hotkey_info_unbind().
| 
 | The hotkey listener on which to bind a hotkey | 
| 
 | The GtkHotkeyInfo to bind. See "signature" | 
| 
 | GError in which to store errors, or NULLto ignore | 
| Returns : | TRUEif the binding has been removed, orFALSEotherwise.
          In case of runtime errorserrorwill be set | 
"activated" signalvoid user_function (GtkHotkeyListener *listener, GtkHotkeyInfo *hotkey, guint event_time, gpointer user_data) : Run Last
Emitted when a registered hotkey has been activated.
| 
 | The object that emitted the signal | 
| 
 | a GtkHotkeyInfo for the hotkey that was activated | 
| 
 | Time for event triggering the keypress. This is mainly used to pass to window management functions to pass through focus stealing prevention | 
| 
 | user data set when the signal handler was connected. |