pnmixer
Volume mixer for the system tray
|
Hotkey subsystem. More...
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <X11/XKBlib.h>
#include "support-log.h"
#include "hotkey.h"
Go to the source code of this file.
Functions | |
static int | grab_error_handler (G_GNUC_UNUSED Display *disp, G_GNUC_UNUSED XErrorEvent *ev) |
void | hotkey_ungrab (Hotkey *hotkey) |
gboolean | hotkey_grab (Hotkey *hotkey) |
gboolean | hotkey_matches (Hotkey *hotkey, guint code, GdkModifierType mods) |
void | hotkey_free (Hotkey *hotkey) |
Hotkey * | hotkey_new (guint code, GdkModifierType mods) |
gchar * | hotkey_code_to_accel (guint code, GdkModifierType mods) |
void | hotkey_accel_to_code (const gchar *accel, gint *code, GdkModifierType *mods) |
Variables | |
static guint | keymasks [] |
static char | grab_error |
Hotkey subsystem.
This file define what's a hotkey. Deals with the low-level XKBlib and Gtk/Gdk.
Definition in file hotkey.c.
|
static |
void hotkey_accel_to_code | ( | const gchar * | accel, |
gint * | code, | ||
GdkModifierType * | mods | ||
) |
gchar* hotkey_code_to_accel | ( | guint | code, |
GdkModifierType | mods | ||
) |
void hotkey_free | ( | Hotkey * | hotkey | ) |
gboolean hotkey_grab | ( | Hotkey * | hotkey | ) |
Grab a key manually. Should be paired with a hotkey_ungrab() call.
hotkey | a Hotkey instance. |
gboolean hotkey_matches | ( | Hotkey * | hotkey, |
guint | code, | ||
GdkModifierType | mods | ||
) |
Checks if the keycode we got (minus modifiers like numlock/capslock) matches the hotkey. Thus numlock + o will match o.
hotkey | a Hotkey instance. |
code | the key code to compare against. |
mods | the key modifiers to compare against. |
Hotkey* hotkey_new | ( | guint | code, |
GdkModifierType | mods | ||
) |
void hotkey_ungrab | ( | Hotkey * | hotkey | ) |
Ungrab a key manually. Should be paired with a hotkey_grab() call.
hotkey | a Hotkey instance. |