Index: doc-rnd/gpmi/packages/Makefile
===================================================================
--- doc-rnd/gpmi/packages/Makefile (nonexistent)
+++ doc-rnd/gpmi/packages/Makefile (revision 778)
@@ -0,0 +1,9 @@
+ROOT=../../..
+all: actions_ref.html dialogs_ref.html hid_ref.html layout_ref.html
+
+include $(ROOT)/src/pcb-gpmi/Makefile.config
+
+%_ref.html: $(ROOT)/src/pcb-gpmi/gpmi_plugin/gpmi_pkg/%.h
+ $(ROOT)/util/genref.sh $^ $(ROOT) $(PCB_CFLAGS) >$@
+
+
Index: doc-rnd/gpmi/packages/actions.html
===================================================================
--- doc-rnd/gpmi/packages/actions.html (revision 777)
+++ doc-rnd/gpmi/packages/actions.html (revision 778)
@@ -102,78 +102,5 @@
of create_menu() is executed. Thus the script usually registers a new action
first then registers one or more menu items executing those actions.
-
API reference
- event ACTE_action(int event_id, const char *name, int argc, int x, int y)
- Arguments:
-
- - event_id
-
- const char *name: name of the action (as registed using function action_register())
-
- int argc: number of arguments. Arguments can be accessed using function action_arg
-
- int x, int y: optional coords, if need_xy was not empty at action_register
-
-
- function action_register(const char *name, const char *need_xy, const char *description, const char *syntax)
- Arguments:
-
- - const char *name: name of the action
-
- const char *need_xy: the question the user is asked when he needs to choose a coordinate; if empty, no coordinate is asked
-
- const char *description: description of the action (for the help)
-
- const char *syntax: syntax of the action (for the help)
-
- Returns 0 on success.
-
- Multiple actions can be registered. Any action registered by the script
- will trigger an ACTE_event sent to the script.
-
-
function const char *action_arg(int argn)
- Extracts action argument argn for the current action
- (makes sense only in an ACTE_action event handler).
- Arguments:
-
- - int N: return the Nth argument
-
- Returns an argument or empty string if N is out of range [0..argc-1].
-
- PCB action optionally have arguments.
- The interface is "int argc, char *argv[]" based in PCB.
- Due to syntax limitations the event handler does not receive argv directly,.
- The script can access te argv[] array using action_arg().
-
-
event ACTE_gui_init(int event_id, int argc, char **argv);
- Called right after gui initialization, before the gui main loop.
- Arguments:
-
- - event_id
-
- int argc: number of arguments the gui was initialized with.
-
- char **argv[]: arguments the gui was initialized with - unaccessible for the scripts.
-
-
- event ACTE_unload(int event_id, const char *conffile);
- Called right before unloading a script to give the script a chance
- to clean up.
- Arguments:
-
- - event_id
-
- const char *conffile: the name of the config file that originally triggered laoding the script, or empty if the script was loaded from the gui.
-
-
- function int action(const char *cmdline)
- Execute a pcb-rnd action. Returns non-zero on error; generally
- returns value of the action (which is also non-zero on error).
-
- - const char *cmdline: pcb-rnd command line in action_name(arg1, arg2, ..., argN) format
-
-
- function void create_menu(const char *path, const char *action, const char *mnemonic, const char *hotkey, const char *tooltip)
- Create a new menu or submenu at path. Missing parents are created automatically
- with empty action, mnemonic, hotkey and tooltop.
-
- - const char *path: the full path of the new menu
-
- const char *action: this action is executed when the user clicks on the menu
-
- const char *mnemonic: which letter to underline in the menu text (will be the fast-jump-there key once the menu is open)
-
- const char *hotkey: when this key is pressed in the main gui, the action is also triggered; the format is modifiers<Key>letter, where modifiers is Alt, Shift or Ctrl. This is the same syntax that is used in the .res files.
-
- const char *tooltip: short help text
-
-