|
Crossfire Client, Branches
R11627
|
#include <config.h>#include <stdlib.h>#include <sys/stat.h>#include <unistd.h>#include <gtk/gtk.h>#include <gdk/gdkx.h>#include <gdk/gdkkeysyms.h>#include "client-types.h"#include "gx11.h"#include "client.h"#include "p_cmd.h"#include "def-keys.h"#include "gtkproto.h"
Include dependency graph for keys.c:Go to the source code of this file.
Data Structures | |
| struct | Keys |
Macros | |
| #define | KEYF_EDIT 0x08 /* Line editor */ |
| #define | KEYF_FIRE 0x02 /* Used in fire mode */ |
| #define | KEYF_MODIFIERS 0x07 /* Mask for actual keyboard modifiers, */ |
| #define | KEYF_NORMAL 0x01 /* Used in normal mode */ |
| #define | KEYF_RUN 0x04 /* Used in run mode */ |
| #define | KEYF_STANDARD 0x10 /* For standard (built in) key definitions */ |
| #define | KEYHASH 257 |
Typedefs | |
| typedef struct Keys | Key_Entry |
Functions | |
| void | bind_callback (GtkWidget *gtklist, GdkEventButton *event) |
| void | bind_key (const char *params) |
| void | ckeyclear (void) |
| void | ckeyentry_callback (GtkWidget *widget, GdkEventKey *event, GtkWidget *window) |
| void | ckeyunbind (GtkWidget *gtklist, GdkEventButton *event) |
| static void | configure_keys (uint32 keysym) |
| void | disconnect (GtkWidget *) |
| void | draw_keybindings (GtkWidget *keylist) |
| static char * | get_key_info (Key_Entry *key, int save_mode) |
| static void | init_default_keybindings (void) |
| void | init_keys (void) |
| static void | insert_key (uint32 keysym, int flags, const char *command) |
| void | keyfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window) |
| void | keyrelfunc (GtkWidget *widget, GdkEventKey *event, GtkWidget *window) |
| 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) |
| 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) |
Variables | |
| static char | bind_buf [MAX_BUF] |
| static int | bind_flags =0 |
| static uint32 * | bind_keysym |
| static uint32 | cancelkeysym |
| static uint32 | commandkeysym |
| static uint32 | completekeysym |
| const char *const | directions [9] |
| static uint32 | firekeysym [2] |
| static Key_Entry * | keys [KEYHASH] |
| static uint32 | nextkeysym |
| static uint32 | prevkeysym |
| const char *const | rcsid_gtk_keys_c |
| static uint32 | runkeysym [2] |
Handles most of the GTK V1 client keyboard related functions. This includes binding and unbinding keys, handling keypresses, and looking up the keys.
Definition in file keys.c.
| #define KEYF_EDIT 0x08 /* Line editor */ |
Definition at line 97 of file keys.c.
Referenced by bind_key(), draw_keybindings(), get_key_info(), parse_key(), and parse_keybind_line().
| #define KEYF_FIRE 0x02 /* Used in fire mode */ |
Definition at line 93 of file keys.c.
Referenced by bind_callback(), bind_key(), configure_keys(), draw_keybindings(), get_key_info(), parse_key(), and parse_keybind_line().
| #define KEYF_MODIFIERS 0x07 /* Mask for actual keyboard modifiers, */ |
Definition at line 95 of file keys.c.
Referenced by bind_callback(), bind_key(), configure_keys(), draw_keybindings(), get_key_info(), and parse_key().
| #define KEYF_NORMAL 0x01 /* Used in normal mode */ |
Definition at line 92 of file keys.c.
Referenced by bind_key(), draw_keybindings(), get_key_info(), parse_key(), and parse_keybind_line().
| #define KEYF_RUN 0x04 /* Used in run mode */ |
Definition at line 94 of file keys.c.
Referenced by bind_callback(), bind_key(), configure_keys(), draw_keybindings(), get_key_info(), parse_key(), and parse_keybind_line().
| #define KEYF_STANDARD 0x10 /* For standard (built in) key definitions */ |
Definition at line 98 of file keys.c.
Referenced by draw_keybindings(), get_key_info(), parse_keybind_line(), show_keys(), and unbind_key().
| #define KEYHASH 257 |
Definition at line 106 of file keys.c.
Referenced by draw_keybindings(), init_keys(), insert_key(), parse_key(), save_keys(), show_keys(), and unbind_key().
| void bind_callback | ( | GtkWidget * | gtklist, |
| GdkEventButton * | event | ||
| ) |
Definition at line 1181 of file keys.c.
References bind_flags, cclist, ckentrytext, ckeyentrytext, cmodentrytext, draw_info(), draw_keybindings(), insert_key(), KEYF_FIRE, KEYF_MODIFIERS, KEYF_RUN, Keys::keysym, MAX_BUF, NDI_BLACK, and save_keys().
Referenced by configdialog().
Here is the call graph for this function:
Here is the caller graph for this function:| void ckeyclear | ( | void | ) |
Definition at line 1251 of file keys.c.
References ckentrytext, ckeyentrytext, cmodentrytext, and cnumentrytext.
Referenced by configdialog().
Here is the caller graph for this function:| void ckeyentry_callback | ( | GtkWidget * | widget, |
| GdkEventKey * | event, | ||
| GtkWidget * | window | ||
| ) |
Definition at line 1233 of file keys.c.
References ckeyentrytext, and cmodentrytext.
Referenced by configdialog().
Here is the caller graph for this function:| void ckeyunbind | ( | GtkWidget * | gtklist, |
| GdkEventButton * | event | ||
| ) |
Definition at line 1214 of file keys.c.
References cclist, draw_keybindings(), and unbind_key().
Referenced by configdialog().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 855 of file keys.c.
References bind_buf, bind_flags, bind_keysym, cpl, draw_info(), draw_message_window(), Player_Struct::fire_on, firekeysym, Player_Struct::input_state, insert_key(), KEYF_FIRE, KEYF_MODIFIERS, KEYF_RUN, Keys::keysym, MAX_BUF, NDI_BLACK, Playing, Player_Struct::run_on, runkeysym, and save_keys().
Referenced by do_key_press(), and keyfunc().
Here is the call graph for this function:
Here is the caller graph for this function:| void disconnect | ( | GtkWidget * | ) |
Definition at line 2773 of file gx11.c.
References cleanup_textmanagers(), csocket, csocket_fd, and ClientSocket::fd.
Referenced by cancelConnection(), get_menu_display(), and keyfunc().
Here is the call graph for this function:
Here is the caller graph for this function:| void draw_keybindings | ( | GtkWidget * | keylist | ) |
Definition at line 1129 of file keys.c.
Referenced by bind_callback(), and ckeyunbind().
Here is the caller graph for this function:
|
static |
Definition at line 544 of file keys.c.
References bind_buf, Keys::command, Keys::flags, KEYF_EDIT, KEYF_FIRE, KEYF_MODIFIERS, KEYF_NORMAL, KEYF_RUN, KEYF_STANDARD, Keys::keysym, and MAX_BUF.
Referenced by save_individual_key(), show_keys(), and unbind_key().
Here is the caller graph for this function:
|
static |
Definition at line 285 of file keys.c.
References def_keys, MAX_BUF, and parse_keybind_line().
Referenced by init_keys().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 116 of file keys.c.
References Keys::command, Keys::direction, directions, Keys::flags, KEYHASH, Keys::keysym, Keys::next, and strdup_local().
Referenced by bind_callback(), configure_keys(), and parse_keybind_line().
Here is the call graph for this function:
Here is the caller graph for this function:| void keyfunc | ( | GtkWidget * | widget, |
| GdkEventKey * | event, | ||
| GtkWidget * | window | ||
| ) |
| void keyrelfunc | ( | GtkWidget * | widget, |
| GdkEventKey * | event, | ||
| GtkWidget * | window | ||
| ) |
|
static |
Definition at line 437 of file keys.c.
References Keys::command, Command_Mode, commandkeysym, CONFIG_ECHO, CONFIG_SPLITWIN, Player_Struct::count, counttext, cpl, Keys::direction, draw_info(), entrytext, extended_command(), FALSE, fire_dir(), fire_label, Player_Struct::fire_on, firekeysym, Keys::flags, gtkwin_info, Player_Struct::input_state, Player_Struct::input_text, KEYF_EDIT, KEYF_FIRE, KEYF_MODIFIERS, KEYF_NORMAL, KEYF_RUN, KEYHASH, Keys::keysym, MAX_BUF, NDI_BLACK, Keys::next, Player_Struct::no_echo, run_dir(), run_label, Player_Struct::run_on, runkeysym, and use_config.
Referenced by do_key_press(), and keyfunc().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 407 of file keys.c.
References clear_fire(), clear_run(), CONFIG_ECHO, cpl, draw_info(), fire_label, Player_Struct::fire_on, firekeysym, NDI_BLACK, run_label, Player_Struct::run_on, runkeysym, and use_config.
Referenced by check_x_events(), and keyrelfunc().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 156 of file keys.c.
References bind_buf, commandkeysym, completekeysym, firekeysym, Keys::flags, insert_key(), KEYF_EDIT, KEYF_FIRE, KEYF_NORMAL, KEYF_RUN, KEYF_STANDARD, Keys::keysym, LOG(), LOG_WARNING, nextkeysym, prevkeysym, and runkeysym.
Referenced by init_default_keybindings(), and init_keys().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 781 of file keys.c.
References get_key_info(), and Keys::next.
Referenced by save_keys().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 788 of file keys.c.
References commandkeysym, completekeysym, cpl, draw_info(), firekeysym, KEYHASH, LOG(), LOG_WARNING, make_path_to_file(), MAX_BUF, Player_Struct::name, NDI_BLACK, nextkeysym, prevkeysym, runkeysym, and save_individual_key().
Referenced by bind_callback(), configure_keys(), and unbind_key().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 599 of file keys.c.
References bind_buf, commandkeysym, completekeysym, draw_info(), firekeysym, Keys::flags, get_key_info(), KEYF_STANDARD, KEYHASH, MAX_BUF, NDI_BLACK, Keys::next, nextkeysym, prevkeysym, and runkeysym.
Referenced by unbind_key().
Here is the call graph for this function:
Here is the caller graph for this function:| void unbind_key | ( | const char * | params | ) |
Definition at line 918 of file keys.c.
Referenced by ckeyunbind().
Here is the caller graph for this function:
|
static |
Definition at line 910 of file keys.c.
References draw_info(), and NDI_BLACK.
Referenced by unbind_key().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 90 of file keys.c.
Referenced by bind_key(), configure_keys(), get_key_info(), parse_keybind_line(), show_keys(), and unbind_key().
|
static |
Definition at line 89 of file keys.c.
Referenced by bind_callback(), bind_key(), and configure_keys().
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), and configure_keys().
|
static |
Definition at line 87 of file keys.c.
Referenced by init_keys(), and keyfunc().
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), init_keys(), parse_key(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), init_keys(), keyfunc(), parse_keybind_line(), save_keys(), and show_keys().
| const char* const directions[9] |
Definition at line 48 of file player.c.
Referenced by insert_key().
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), configure_keys(), init_keys(), parse_key(), parse_key_release(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), init_keys(), keyfunc(), parse_keybind_line(), save_keys(), and show_keys().
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), init_keys(), keyfunc(), parse_keybind_line(), save_keys(), and show_keys().
| const char* const rcsid_gtk_keys_c |
|
static |
Definition at line 87 of file keys.c.
Referenced by bind_key(), configure_keys(), init_keys(), parse_key(), parse_key_release(), parse_keybind_line(), save_keys(), and show_keys().