pcb 4.1.1
An interactive printed circuit board layout editor.

hid_resource.c File Reference

#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "global.h"
#include "hid.h"
#include "resource.h"
#include "hid/common/hid_resource.h"
Include dependency graph for hid_resource.c:

Go to the source code of this file.

Functions

static Resourceres_wrap (char *value)
static unsigned parse_mods (char *value)
static int button_name_to_num (const char *name)
void load_mouse_resource (const Resource *res)
static Resourcefind_best_action (int button, int start, unsigned mod_mask)
void do_mouse_action (int button, int mod_mask)

Variables

static int button_count
static int * button_nums
static int * mod_count
static unsigned * mods
static Resource ** actions

Function Documentation

static int button_name_to_num ( const char *  name) [static]

Definition at line 58 of file hid_resource.c.

Referenced by load_mouse_resource().

void do_mouse_action ( int  button,
int  mod_mask 
)
static Resource* find_best_action ( int  button,
int  start,
unsigned  mod_mask 
) [static]

Definition at line 161 of file hid_resource.c.

References M_Release, mod_count, and mods.

Referenced by do_mouse_action().

void load_mouse_resource ( const Resource res)
static unsigned parse_mods ( char *  value) [static]

Definition at line 28 of file hid_resource.c.

References m, M_Alt, M_Ctrl, M_Mod, M_Release, M_Shift, and s.

Referenced by load_mouse_resource().

static Resource* res_wrap ( char *  value) [static]

Definition at line 19 of file hid_resource.c.

References resource_add_val(), and resource_create().

Referenced by load_mouse_resource().

Here is the call graph for this function:


Variable Documentation

Resource** actions [static]

Definition at line 16 of file hid_resource.c.

int button_count [static]

Definition at line 12 of file hid_resource.c.

Referenced by do_mouse_action(), and load_mouse_resource().

int* button_nums [static]

Definition at line 13 of file hid_resource.c.

Referenced by do_mouse_action(), and load_mouse_resource().

int* mod_count [static]

Definition at line 14 of file hid_resource.c.

Referenced by do_mouse_action(), find_best_action(), and load_mouse_resource().