girara
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
shortcuts.c File Reference
#include "shortcuts.h"
#include "datastructures.h"
#include "internal.h"
#include "session.h"
#include "settings.h"
#include "tabs.h"
#include "input-history.h"
#include <string.h>
#include <gtk/gtk.h>

Go to the source code of this file.

Functions

bool girara_shortcut_add (girara_session_t *session, guint modifier, guint key, const char *buffer, girara_shortcut_function_t function, girara_mode_t mode, int argument_n, void *argument_data)
bool girara_shortcut_remove (girara_session_t *session, guint modifier, guint key, const char *buffer, girara_mode_t mode)
void girara_shortcut_free (girara_shortcut_t *shortcut)
bool girara_inputbar_shortcut_add (girara_session_t *session, guint modifier, guint key, girara_shortcut_function_t function, int argument_n, void *argument_data)
bool girara_inputbar_shortcut_remove (girara_session_t *session, guint modifier, guint key)
void girara_inputbar_shortcut_free (girara_inputbar_shortcut_t *inputbar_shortcut)
bool girara_isc_abort (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_isc_string_manipulation (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_isc_command_history (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_focus_inputbar (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_abort (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_quit (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_tab_close (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_tab_navigate (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int t)
bool girara_sc_tab_navigate_next (girara_session_t *session, girara_argument_t *argument, girara_event_t *event, unsigned int t)
bool girara_sc_tab_navigate_prev (girara_session_t *session, girara_argument_t *argument, girara_event_t *event, unsigned int t)
bool girara_sc_toggle_inputbar (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_toggle_statusbar (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_toggle_tabbar (girara_session_t *session, girara_argument_t *UNUSED(argument), girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_set (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int UNUSED(t))
bool girara_sc_feedkeys (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int t)
bool girara_shortcut_mapping_add (girara_session_t *session, const char *identifier, girara_shortcut_function_t function)
void girara_shortcut_mapping_free (girara_shortcut_mapping_t *mapping)
bool girara_argument_mapping_add (girara_session_t *session, const char *identifier, int value)
void girara_argument_mapping_free (girara_argument_mapping_t *argument_mapping)
bool girara_mouse_event_add (girara_session_t *session, guint mask, guint button, girara_shortcut_function_t function, girara_mode_t mode, girara_event_type_t event_type, int argument_n, void *argument_data)
bool girara_mouse_event_remove (girara_session_t *session, guint mask, guint button, girara_mode_t mode)
void girara_mouse_event_free (girara_mouse_event_t *mouse_event)

Function Documentation

bool girara_argument_mapping_add ( girara_session_t *  session,
const char *  identifier,
int  value 
)

Creates a mapping between a shortcut argument and an identifier and is used to evalue the mapping command

Parameters
sessionThe girara session
identifierThe identifier
valueThe value that should be represented
Returns
true if no error occured

Definition at line 649 of file shortcuts.c.

void girara_argument_mapping_free ( girara_argument_mapping_t *  argument_mapping)

Definition at line 676 of file shortcuts.c.

bool girara_inputbar_shortcut_add ( girara_session_t *  session,
guint  modifier,
guint  key,
girara_shortcut_function_t  function,
int  argument_n,
void *  argument_data 
)

Adds an inputbar shortcut

Parameters
sessionThe used girara session
modifierThe modifier
keyThe key
functionExecuted function
argument_nArgument identifier
argument_dataArgument data
Returns
true No error occured
false An error occured

Definition at line 98 of file shortcuts.c.

void girara_inputbar_shortcut_free ( girara_inputbar_shortcut_t *  inputbar_shortcut)

Definition at line 146 of file shortcuts.c.

bool girara_inputbar_shortcut_remove ( girara_session_t *  session,
guint  modifier,
guint  key 
)

Removes an inputbar shortcut

Parameters
sessionThe used girara session
modifierThe modifier
keyThe key
Returns
true No error occured
false An error occured

Definition at line 129 of file shortcuts.c.

bool girara_isc_abort ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 152 of file shortcuts.c.

bool girara_isc_command_history ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 262 of file shortcuts.c.

bool girara_isc_string_manipulation ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 184 of file shortcuts.c.

bool girara_mouse_event_add ( girara_session_t *  session,
guint  mask,
guint  button,
girara_shortcut_function_t  function,
girara_mode_t  mode,
girara_event_type_t  event_type,
int  argument_n,
void *  argument_data 
)

Adds a mouse event

Parameters
sessionThe used girara session
maskThe mask
buttonPressed button
functionExecuted function
modeAvailable mode
event_typeEvent type
argument_nArgument identifier
argument_dataArgument data
Returns
true No error occured
false An error occured

Definition at line 687 of file shortcuts.c.

void girara_mouse_event_free ( girara_mouse_event_t *  mouse_event)

Definition at line 742 of file shortcuts.c.

bool girara_mouse_event_remove ( girara_session_t *  session,
guint  mask,
guint  button,
girara_mode_t  mode 
)

Removes a mouse event

Parameters
sessionThe used girara session
maskThe mask
buttonPressed button
modeAvailable mode
Returns
true No error occured
false An error occured

Definition at line 723 of file shortcuts.c.

bool girara_sc_abort ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 318 of file shortcuts.c.

bool girara_sc_feedkeys ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int  t 
)

Definition at line 490 of file shortcuts.c.

bool girara_sc_focus_inputbar ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 284 of file shortcuts.c.

bool girara_sc_quit ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 334 of file shortcuts.c.

bool girara_sc_set ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 452 of file shortcuts.c.

bool girara_sc_tab_close ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 347 of file shortcuts.c.

bool girara_sc_tab_navigate ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int  t 
)

Definition at line 361 of file shortcuts.c.

bool girara_sc_tab_navigate_next ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  event,
unsigned int  t 
)

Navigate to the next tab

Parameters
sessionThe used girara session
argumentThe used argument
eventGirara event
tNumber of executions
Returns
true if no error occured otherwise false

Definition at line 390 of file shortcuts.c.

bool girara_sc_tab_navigate_prev ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  event,
unsigned int  t 
)

Navigate to the previous tab

Parameters
sessionThe used girara session
argumentThe used argument
eventGirara event
tNumber of executions
Returns
true if no error occured otherwise false

Definition at line 399 of file shortcuts.c.

bool girara_sc_toggle_inputbar ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 422 of file shortcuts.c.

bool girara_sc_toggle_statusbar ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 432 of file shortcuts.c.

bool girara_sc_toggle_tabbar ( girara_session_t *  session,
girara_argument_t *  UNUSEDargument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 442 of file shortcuts.c.

bool girara_shortcut_add ( girara_session_t *  session,
guint  modifier,
guint  key,
const char *  buffer,
girara_shortcut_function_t  function,
girara_mode_t  mode,
int  argument_n,
void *  argument_data 
)

Adds a shortcut

Note: currently argument_data accepts only a character string

Parameters
sessionThe used girara session
modifierThe modifier
keyThe key
bufferBuffer command
functionExecuted function
modeAvailable modes
argument_nArgument identifier
argument_dataArgument data
Returns
true No error occured
false An error occured

Definition at line 18 of file shortcuts.c.

void girara_shortcut_free ( girara_shortcut_t *  shortcut)

Definition at line 89 of file shortcuts.c.

bool girara_shortcut_mapping_add ( girara_session_t *  session,
const char *  identifier,
girara_shortcut_function_t  function 
)

Creates a mapping between a shortcut function and an identifier and is used to evaluate the mapping command

Parameters
sessionThe girara session
identifierOptional identifier
functionThe function that should be mapped
Returns
true if no error occured

Definition at line 611 of file shortcuts.c.

void girara_shortcut_mapping_free ( girara_shortcut_mapping_t *  mapping)

Definition at line 638 of file shortcuts.c.

bool girara_shortcut_remove ( girara_session_t *  session,
guint  modifier,
guint  key,
const char *  buffer,
girara_mode_t  mode 
)

Removes a shortcut

Parameters
sessionThe used girara session
modifierThe modifier
keyThe key
bufferBuffer command
modeAvailable modes
Returns
true No error occured
false An error occured

Definition at line 68 of file shortcuts.c.