Kaydet (Commit) 76603930 authored tarafından Nick Treleaven's avatar Nick Treleaven

Add documentation for keybindings structs.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2313 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 84bd7aed
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
* $Id$ * $Id$
*/ */
/**
* @file keybindings.h
* Configurable keyboard shortcuts.
**/
#ifndef GEANY_KEYBINDINGS_H #ifndef GEANY_KEYBINDINGS_H
#define GEANY_KEYBINDINGS_H 1 #define GEANY_KEYBINDINGS_H 1
...@@ -36,27 +41,24 @@ ...@@ -36,27 +41,24 @@
typedef void (*KBCallback) (guint key_id); typedef void (*KBCallback) (guint key_id);
/* holds all user-definable key bindings */ /** Represents a single keybinding action */
typedef struct KeyBinding typedef struct KeyBinding
{ {
guint key; guint key; /**< Key value in lower-case, such as @c GDK_a */
GdkModifierType mods; GdkModifierType mods; /**< Modifier keys, such as @c GDK_CONTROL_MASK */
/* at the moment only needed as keys for the configuration file because indices or translatable const gchar *name; /**< Key name for the configuration file, such as @c "menu_new" */
* strings as keys are not very useful */ const gchar *label; /**< Label used in the preferences dialog keybindings tab */
const gchar *name; KBCallback cb_func; /**< Callback function called when the key combination is pressed */
const gchar *label;
/* function pointer to a callback function, just to keep the code in keypress event
* callback function clear */
KBCallback cb_func;
} KeyBinding; } KeyBinding;
/** A collection of keybindings grouped together. */
typedef struct KeyBindingGroup typedef struct KeyBindingGroup
{ {
const gchar *name; /* group name used for keyfile group */ const gchar *name; /**< Group name used in the configuration file, such as @c "html_chars" */
const gchar *label; /* group label in preferences dialog in keybinding treeview */ const gchar *label; /**< Group label used in the preferences dialog keybindings tab */
gsize count; /* count of KeyBinding structs in keys */ gsize count; /**< Count of KeyBinding structs in @a keys */
KeyBinding *keys; /* fixed array of KeyBinding structs */ KeyBinding *keys; /**< Fixed array of KeyBinding structs */
} }
KeyBindingGroup; KeyBindingGroup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment