Crossfire Client, Branches
R11627
|
#include <config.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include <gdk/gdkx.h>
#include <gdk/gdkkeysyms.h>
#include "client-types.h"
#include "main.h"
#include "client.h"
#include "proto.h"
#include "def-keys.h"
#include "image.h"
#include "gtk2proto.h"
#include "p_cmd.h"
Go to the source code of this file.
Data Structures | |
struct | Keys |
Macros | |
#define | KEYF_ALT 0x20 |
#define | KEYF_EDIT 0x08 |
#define | KEYF_FIRE 0x02 |
#define | KEYF_META 0x40 |
#define | KEYF_MODIFIERS 0x67 |
#define | KEYF_NORMAL 0x01 |
#define | KEYF_RUN 0x04 |
#define | KEYF_STANDARD 0x10 |
#define | KEYHASH 257 |
Typedefs | |
Key Entry Struct | |
EndOf Bind Log A keybinding hash record structure. | |
typedef struct Keys | Key_Entry |
Enumerations | |
KList Enum | |
EndOf UI Widgets Changed to KLIST_* to avoid conflicts in Win2000 and up | |
enum | { KLIST_ENTRY, KLIST_KEY, KLIST_MODS, KLIST_EDIT, KLIST_COMMAND, KLIST_KEY_ENTRY } |
Functions | |
void | bind_key (char *params) |
static void | configure_keys (uint32 keysym) |
void | draw_keybindings (GtkWidget *keylist) |
void | draw_prompt (const char *str) |
static char * | get_key_info (Key_Entry *key, int save_mode) |
void | gtk_command_history (int direction) |
void | gtk_complete_command (void) |
static void | init_default_keybindings (void) |
static void | insert_key (uint32 keysym, int flags, const char *command) |
static void | keybinding_get_data (uint32 *keysym, uint8 *flags, const char **command) |
gboolean | keybinding_selection_func (GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer userdata) |
void | keyfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window) |
void | keyrelfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window) |
void | keys_init (GtkWidget *window_root) |
void | on_entry_commands_activate (GtkEntry *entry, gpointer user_data) |
void | on_keybinding_button_bind_clicked (GtkButton *button, gpointer user_data) |
void | on_keybinding_button_clear_clicked (GtkButton *button, gpointer user_data) |
void | on_keybinding_button_close_clicked (GtkButton *button, gpointer user_data) |
void | on_keybinding_button_remove_clicked (GtkButton *button, gpointer user_data) |
void | on_keybinding_button_update_clicked (GtkButton *button, gpointer user_data) |
gboolean | on_keybinding_entry_key_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
void | on_keybindings_activate (GtkMenuItem *menuitem, gpointer user_data) |
static void | parse_key (char key, uint32 keysym) |
static void | parse_key_release (uint32 ks) |
static void | parse_keybind_line (char *buf, int line, int standard) |
void | reset_keybinding_status (void) |
static void | save_individual_key (FILE *fp, Key_Entry *key, KeyCode kc) |
static void | save_keys (void) |
static void | show_keys (int allbindings) |
void | unbind_key (const char *params) |
static void | unbind_usage (void) |
void | update_keybinding_list (void) |
void | x_set_echo (void) |
Bind Log | |
#define | MAX_HISTORY 50 |
#define | MAX_COMMAND_LEN 256 |
char | history [MAX_HISTORY][MAX_COMMAND_LEN] |
static int | cur_history_position =0 |
static int | scroll_history_position =0 |
Handles most of the keyboard related functions - binding and unbinding keys, and handling keypresses and looking up the keys.
Definition in file keys.c.
#define KEYF_ALT 0x20 |
For ALT key modifier
Definition at line 147 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), keybinding_get_data(), keybinding_selection_func(), parse_key(), parse_keybind_line(), and update_keybinding_list().
#define KEYF_EDIT 0x08 |
Line editor
Definition at line 145 of file keys.c.
Referenced by bind_key(), get_key_info(), keybinding_get_data(), keybinding_selection_func(), parse_key(), parse_keybind_line(), and update_keybinding_list().
#define KEYF_FIRE 0x02 |
Used in fire mode
Definition at line 143 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), keybinding_get_data(), keybinding_selection_func(), parse_key(), parse_keybind_line(), and update_keybinding_list().
#define KEYF_META 0x40 |
For Meta key modifier
Definition at line 148 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), keybinding_get_data(), keybinding_selection_func(), parse_key(), parse_keybind_line(), and update_keybinding_list().
#define KEYF_MODIFIERS 0x67 |
Mask for actual keyboard modifiers, not action modifiers
Definition at line 149 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), keybinding_get_data(), parse_key(), and update_keybinding_list().
#define KEYF_NORMAL 0x01 |
Used in normal mode
Definition at line 142 of file keys.c.
Referenced by bind_key(), get_key_info(), keybinding_get_data(), parse_key(), and parse_keybind_line().
#define KEYF_RUN 0x04 |
Used in run mode
Definition at line 144 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), keybinding_get_data(), keybinding_selection_func(), parse_key(), parse_keybind_line(), and update_keybinding_list().
#define KEYF_STANDARD 0x10 |
For standard/built-in keybinds
Definition at line 146 of file keys.c.
Referenced by get_key_info(), parse_keybind_line(), show_keys(), unbind_key(), and update_keybinding_list().
#define KEYHASH 257 |
Definition at line 155 of file keys.c.
Referenced by configure_keys(), insert_key(), keys_init(), on_keybinding_button_remove_clicked(), parse_key(), save_keys(), show_keys(), unbind_key(), and update_keybinding_list().
#define MAX_COMMAND_LEN 256 |
Definition at line 100 of file keys.c.
Referenced by on_entry_commands_activate().
#define MAX_HISTORY 50 |
Definition at line 99 of file keys.c.
Referenced by gtk_command_history(), keys_init(), and on_entry_commands_activate().
anonymous enum |
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), configure_keys(), keys_init(), parse_key(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 140 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), keybinding_get_data(), and parse_keybind_line().
|
static |
Definition at line 139 of file keys.c.
Referenced by bind_key(), and configure_keys().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), and configure_keys().
|
static |
Definition at line 135 of file keys.c.
Referenced by keyfunc(), and keys_init().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), keys_init(), parse_key(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), keys_init(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 103 of file keys.c.
Referenced by gtk_command_history(), and on_entry_commands_activate().
GtkWidget* entry_commands |
Definition at line 77 of file keys.c.
Referenced by draw_prompt(), gtk_command_history(), gtk_complete_command(), keyfunc(), keyrelfunc(), keys_init(), parse_key(), and x_set_echo().
|
static |
Definition at line 65 of file keys.c.
Referenced by keyfunc(), keys_init(), parse_key(), and parse_key_release().
|
static |
EndOf Key Entry Struct
Definition at line 135 of file keys.c.
Referenced by bind_key(), configure_keys(), keys_init(), parse_key(), parse_keybind_line(), save_keys(), and show_keys().
char history[MAX_HISTORY][MAX_COMMAND_LEN] |
Definition at line 101 of file keys.c.
Referenced by gtk_command_history(), keys_init(), and on_entry_commands_activate().
|
static |
Definition at line 65 of file keys.c.
Referenced by keys_init().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_selection_func(), keys_init(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_selection_func(), keys_init(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), on_keybinding_entry_key_key_press_event(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), on_keybinding_entry_key_key_press_event(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), on_keybinding_entry_key_key_press_event(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), on_keybinding_entry_key_key_press_event(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), and reset_keybinding_status().
|
static |
Definition at line 65 of file keys.c.
Referenced by keybinding_get_data(), keybinding_selection_func(), keys_init(), on_keybinding_entry_key_key_press_event(), and reset_keybinding_status().
|
static |
Definition at line 74 of file keys.c.
Referenced by keys_init(), on_keybinding_button_clear_clicked(), on_keybinding_button_remove_clicked(), and on_keybinding_button_update_clicked().
|
static |
Bound key list for bind dialog.
Definition at line 73 of file keys.c.
Referenced by keys_init(), and update_keybinding_list().
|
static |
Definition at line 65 of file keys.c.
Referenced by keys_init().
|
static |
Definition at line 65 of file keys.c.
Referenced by keys_init(), on_keybinding_button_close_clicked(), and on_keybindings_activate().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), configure_keys(), keys_init(), parse_key(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), keys_init(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), keys_init(), parse_keybind_line(), save_keys(), and show_keys().
const char* const rcsid_gtk2_keys_c |
|
static |
Definition at line 65 of file keys.c.
Referenced by keyfunc(), keys_init(), parse_key(), and parse_key_release().
|
static |
Definition at line 135 of file keys.c.
Referenced by bind_key(), configure_keys(), keys_init(), parse_key(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 103 of file keys.c.
Referenced by gtk_command_history(), and on_entry_commands_activate().
GtkWidget* spinbutton_count |
Definition at line 76 of file keys.c.
Referenced by keys_init(), list_item_action(), and parse_key().