Atrinik Client  4.0
Enumerations | Functions | Variables
settings_keybinding.c File Reference
#include <global.h>

Go to the source code of this file.

Enumerations

enum  { KEYBINDING_STATE_LIST, KEYBINDING_STATE_ADD, KEYBINDING_STATE_EDIT }
 

Functions

static void keybinding_list_reload (void)
 
static void keybinding_apply (void)
 
static int keybinding_action (SDLKey key)
 
static void list_handle_enter (list_struct *list, SDL_Event *event)
 
static void text_input_show_edit (text_input_struct *text_input)
 
static int popup_draw (popup_struct *popup)
 
static int popup_event (popup_struct *popup, SDL_Event *event)
 
static int popup_destroy_callback (popup_struct *popup)
 
static int popup_button_event (popup_button *button)
 
void settings_keybinding_open (void)
 

Variables

static button_struct button_new
 
static button_struct button_remove
 
static button_struct button_apply
 
static text_input_struct text_input_command
 
static text_input_struct text_input_key
 
static int keybinding_state
 
static size_t keybinding_id
 
static list_structlist_keybindings
 

Detailed Description

Keybinding settings GUI.

Author
Alex Tokar

Definition in file settings_keybinding.c.

Function Documentation

static int keybinding_action ( SDLKey  key)
static

Try to handle keybinding action.

Parameters
keyThe key to try to handle.
Returns
1 if the key was handled, 0 otherwise.

Definition at line 107 of file settings_keybinding.c.

static void list_handle_enter ( list_struct list,
SDL_Event *  event 
)
static

Function to handle enter key being pressed on a selected row, or a row being double clicked.

Parameters
listList.
EventEvent that triggered this.

Definition at line 133 of file settings_keybinding.c.

static int popup_button_event ( popup_button button)
static

Callback function to call when the button is clicked.

Parameters
buttonThe clicked button.
Return values
1Handled the event, should not do generic handling.
0Did not handle the event.

Definition at line 333 of file settings_keybinding.c.

static int popup_destroy_callback ( popup_struct popup)
static

Function used right before the visible popup is destroyed using popup_destroy_visible().

Parameters
popupThe popup.
Returns
1 to proceed with the destruction of the popup, 0 otherwise.

Definition at line 316 of file settings_keybinding.c.

static int popup_draw ( popup_struct popup)
static

Function used for drawing on the popup's surface.

Parameters
popupThe popup.
Returns
0 to destroy the popup, 1 otherwise.

Definition at line 157 of file settings_keybinding.c.

static int popup_event ( popup_struct popup,
SDL_Event *  event 
)
static

Function used for handling mouse/key events when popup is visible.

Parameters
eventSDL event.
Return values
-1Did not handle the event.
0Did not handle the event, but allow other keyboard events.
1Handled the event.

Definition at line 214 of file settings_keybinding.c.

static void text_input_show_edit ( text_input_struct text_input)
static

Definition at line 151 of file settings_keybinding.c.

Variable Documentation

button_struct button_new
static

Button buffer.

Definition at line 43 of file settings_keybinding.c.

size_t keybinding_id
static

Keybinding ID that is being edited, if applicable.

Definition at line 55 of file settings_keybinding.c.

int keybinding_state
static

What is being done in the keybinding GUI.

Definition at line 51 of file settings_keybinding.c.

list_struct* list_keybindings
static

The keybindings list.

Definition at line 59 of file settings_keybinding.c.

text_input_struct text_input_command
static

Text input buffer.

Definition at line 47 of file settings_keybinding.c.