1 |
/* |
2 |
* Commands.h |
3 |
* by Kirk Abbott and Ben Allan |
4 |
* Created: 1/94 |
5 |
* Version: $Revision: 1.8 $ |
6 |
* Version control file: $RCSfile: Commands.h,v $ |
7 |
* Date last modified: $Date: 1997/07/18 12:22:40 $ |
8 |
* Last modified by: $Author: mthomas $ |
9 |
* |
10 |
* This file is part of the ASCEND Tcl/Tk interface |
11 |
* |
12 |
* Copyright 1997, Carnegie Mellon University |
13 |
* |
14 |
* The ASCEND Tcl/Tk interface is free software; you can redistribute |
15 |
* it and/or modify it under the terms of the GNU General Public License as |
16 |
* published by the Free Software Foundation; either version 2 of the |
17 |
* License, or (at your option) any later version. |
18 |
* |
19 |
* The ASCEND Tcl/Tk interface is distributed in hope that it will be |
20 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
22 |
* General Public License for more details. |
23 |
* |
24 |
* You should have received a copy of the GNU General Public License |
25 |
* along with the program; if not, write to the Free Software Foundation, |
26 |
* Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named |
27 |
* COPYING. COPYING is found in ../compiler. |
28 |
*/ |
29 |
|
30 |
/** @file |
31 |
* Command Management Routines |
32 |
* <pre> |
33 |
* To include this header, you must include the following: |
34 |
* #include "tcl.h" |
35 |
* #include "utilities/ascConfig.h" |
36 |
* #include "interface/HelpProc.h" |
37 |
* #include "interface/Commands.h" |
38 |
* </pre> |
39 |
*/ |
40 |
|
41 |
#ifndef ASCTK_COMMANDS_H |
42 |
#define ASCTK_COMMANDS_H |
43 |
|
44 |
extern void Asc_CreateCommands(Tcl_Interp *interp); |
45 |
/**< |
46 |
* <!-- void Asc_CreateCommands(interp); --> |
47 |
* Registers all C written code so that the |
48 |
* Tcl interpreter can see them. All Tcl commands should be registered |
49 |
* here. |
50 |
*/ |
51 |
|
52 |
extern void Asc_AddCommand(Tcl_Interp *interp, |
53 |
char *cmdName, |
54 |
Tcl_CmdProc *proc, |
55 |
ClientData cdata, |
56 |
Tcl_CmdDeleteProc *deleteProc, |
57 |
CONST char *group, |
58 |
CONST char *usage, |
59 |
CONST char *shorth, |
60 |
HLFunc longh); |
61 |
/**< |
62 |
* <!-- Asc_AddCommand(interp,cmdName,proc,cdata,deleteProc, --> |
63 |
* <!-- group,usage,shorth,longh) --> |
64 |
* Adds a command to tcl and the ASCEND commandline help data structures. |
65 |
* This function should be used for commands created by dynamically |
66 |
* linked packages that want to use the ascend help facility. |
67 |
*/ |
68 |
|
69 |
#define ASCADDCOM(interp,cmdName,proc,group,usage,shorth,longh) \ |
70 |
Asc_AddCommand((interp), (cmdName), (proc), \ |
71 |
(ClientData)NULL, (Tcl_CmdDeleteProc *)NULL, \ |
72 |
(group),(usage),(shorth),(longh)) |
73 |
/**< |
74 |
* The easier macro form of Asc_AddCommand used for those commands which |
75 |
* do not have tk-widget-like behavior or clientdata. |
76 |
*/ |
77 |
|
78 |
#endif /* ASCTK_COMMANDS_H */ |
79 |
|