pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "global.h"
#include "data.h"
#include "error.h"
#include "hid.h"
#include "../hidint.h"
Go to the source code of this file.
Defines | |
#define | static |
Functions | |
static const char * | check_action_name (const char *s) |
void | hid_register_actions (HID_Action *a, int n) |
void | hid_register_action (HID_Action *a) |
static int | action_sort_compar (const void *va, const void *vb) |
static void | sort_actions () |
static int | action_search_compar (const void *va, const void *vb) |
HID_Action * | hid_find_action (const char *name) |
void | print_actions () |
static void | dump_string (char prefix, const char *str) |
void | dump_actions () |
int | hid_action (const char *name) |
int | hid_actionl (const char *name,...) |
int | hid_actionv (const char *name, int argc, char **argv) |
static int | hid_parse_actionstring (const char *rstr, char require_parens) |
int | hid_parse_command (const char *str_) |
Parse the given command string into action calls, and call hid_actionv for each action found. | |
int | hid_parse_actions (const char *str_) |
Parse the given string into action calls, and call hid_actionv for each action found. | |
Variables | |
static HID_Action ** | all_actions = 0 |
static int | all_actions_sorted = 0 |
static int | n_actions = 0 |
HID_Action * | current_action = NULL |
static const char | pcbchanged_syntax [] = "PCBChanged([revert])" |
static const char | pcbchanged_help [] = "reloaded, and that it might keep some viewport settings" |
static const char | routestyleschanged_syntax [] = "RouteStylesChanged()" |
static const char | routestyleschanged_help [] = "Tells the GUI that the routing styles have changed." |
static const char | netlistchanged_syntax [] = "NetlistChanged()" |
static const char | netlistchanged_help [] = "Tells the GUI that the netlist has changed." |
static const char | layerschanged_syntax [] = "LayersChanged()" |
static const char | layerschanged_help [] = "Tells the GUI that the layers have changed." |
static const char | librarychanged_syntax [] = "LibraryChanged()" |
static const char | librarychanged_help [] = "Tells the GUI that the libraries have changed." |
static int action_search_compar | ( | const void * | va, |
const void * | vb | ||
) | [static] |
Definition at line 79 of file actions.c.
References action, and HID_Action::name.
Referenced by hid_find_action().
static int action_sort_compar | ( | const void * | va, |
const void * | vb | ||
) | [static] |
static const char* check_action_name | ( | const char * | s | ) | [static] |
Definition at line 28 of file actions.c.
Referenced by hid_register_actions().
void dump_actions | ( | ) |
Definition at line 167 of file actions.c.
References all_actions_sorted, HID_Action::description, dump_string(), n_actions, sort_actions(), and HID_Action::syntax.
Referenced by main().
static void dump_string | ( | char | prefix, |
const char * | str | ||
) | [static] |
Definition at line 147 of file actions.c.
Referenced by dump_actions().
int hid_action | ( | const char * | name | ) |
Definition at line 189 of file actions.c.
References hid_actionv().
Referenced by ActionApplyVendor(), ActionAutoPlaceSelected(), ActionAutoRoute(), ActionDJopt(), ActionImport(), ActionNew(), ActionRouteStyle(), ActionSetSame(), ActionSetValue(), ChangeGroupVisibility(), ChangeLayerName(), ChangeLayoutName(), ChangePCBSize(), delete_chart_cb(), DRCAll(), FitCrosshairIntoGrid(), FontEdit(), ImportGUI(), layer_selector_select_callback(), main(), mainwind_delete_cb(), MoveLayer(), NetlistChanged(), PCBChanged(), real_load_pcb(), and SwapSides().
int hid_actionl | ( | const char * | name, |
... | |||
) |
Definition at line 195 of file actions.c.
References hid_actionv().
Referenced by drc_refresh_cb(), EditLayerGroups(), FitCrosshairIntoGrid(), FontEdit(), ghid_close_confirm_dialog(), grid_units_button_cb(), Load(), LoadVendor(), LookupConnection(), main(), nbcb_find(), nbcb_std_callback(), netlist_find_cb(), NotifyMode(), real_load_pcb(), Save(), and SetRouteStyle().
int hid_actionv | ( | const char * | name, |
int | argc, | ||
char ** | argv | ||
) |
Definition at line 210 of file actions.c.
References _, current_action, hid_st::get_coords, gui, hid_find_action(), Message(), HID_Action::need_coord_msg, Settings, HID_Action::trigger_cb, SettingType::verbose, x, and y.
Referenced by handle_exec_action(), hid_action(), hid_actionl(), hid_parse_actionstring(), Load(), LoadVendor(), and Save().
HID_Action* hid_find_action | ( | const char * | name | ) |
Definition at line 87 of file actions.c.
References action, action_search_compar(), all_actions_sorted, n_actions, and sort_actions().
Referenced by hid_actionv().
int hid_parse_actions | ( | const char * | str_ | ) |
Parse the given string into action calls, and call hid_actionv for each action found.
Accepts only "action(arg1, arg2)".
Definition at line 413 of file actions.c.
References hid_parse_actionstring(), and TRUE.
Referenced by ActionExecuteFile(), callback(), do_mouse_action(), ghid_listener_cb(), ghid_menu_cb(), lesstif_key_event(), lesstif_listener_cb(), and main().
static int hid_parse_actionstring | ( | const char * | rstr, |
char | require_parens | ||
) | [static] |
Definition at line 250 of file actions.c.
References _, hid_actionv(), malloc(), max, Message(), and realloc().
Referenced by hid_parse_actions(), and hid_parse_command().
int hid_parse_command | ( | const char * | str_ | ) |
Parse the given command string into action calls, and call hid_actionv for each action found.
Accepts both "action(arg1, arg2)" and command-style "action arg1 arg2", allowing only one action in the later case.
Definition at line 408 of file actions.c.
References FALSE, and hid_parse_actionstring().
Referenced by batch_do_export(), command_callback(), command_entry_activate_cb(), and ghid_handle_user_command().
void hid_register_action | ( | HID_Action * | a | ) |
Definition at line 58 of file actions.c.
References hid_register_actions().
void hid_register_actions | ( | HID_Action * | a, |
int | n | ||
) |
Definition at line 37 of file actions.c.
References _, all_actions_sorted, check_action_name(), Message(), n, n_actions, and realloc().
Referenced by hid_register_action().
void print_actions | ( | void | ) |
Definition at line 112 of file actions.c.
References all_actions_sorted, n_actions, sort_actions(), and HID_Action::syntax.
Referenced by help(), and main().
static void sort_actions | ( | ) | [static] |
Definition at line 72 of file actions.c.
References action_sort_compar(), all_actions_sorted, and n_actions.
Referenced by dump_actions(), hid_find_action(), and print_actions().
HID_Action** all_actions = 0 [static] |
int all_actions_sorted = 0 [static] |
Definition at line 22 of file actions.c.
Referenced by dump_actions(), hid_find_action(), hid_register_actions(), print_actions(), and sort_actions().
HID_Action* current_action = NULL |
This is either NULL or points to the current HID_Action that is being called.
The action launcher sets and unsets this variable.
Definition at line 25 of file actions.c.
Referenced by hid_actionv().
const char layerschanged_help[] = "Tells the GUI that the layers have changed." [static] |
const char layerschanged_syntax[] = "LayersChanged()" [static] |
const char librarychanged_help[] = "Tells the GUI that the libraries have changed." [static] |
const char librarychanged_syntax[] = "LibraryChanged()" [static] |
int n_actions = 0 [static] |
Definition at line 23 of file actions.c.
Referenced by dump_actions(), hid_find_action(), hid_register_actions(), print_actions(), and sort_actions().
const char netlistchanged_help[] = "Tells the GUI that the netlist has changed." [static] |
const char netlistchanged_syntax[] = "NetlistChanged()" [static] |
const char pcbchanged_help[] = "reloaded, and that it might keep some viewport settings" [static] |
const char pcbchanged_syntax[] = "PCBChanged([revert])" [static] |
const char routestyleschanged_help[] = "Tells the GUI that the routing styles have changed." [static] |
const char routestyleschanged_syntax[] = "RouteStylesChanged()" [static] |