Fixes
[opsoft.git] / silentbob / include / mod.h
blobdd23a18467e760b459f715f712755f5c5bbc0c2b
1 /*
2 * (c) Oleg Puchinin 2006
3 * graycardinalster@gmail.com
5 */
7 #ifndef DEFINE_MOD_H
8 #define DEFINE_MOD_H
10 enum plug_type_t {
11 TYPE_LANGUAGE = 0,
12 TYPE_OUTPUT,
13 TYPE_INPUT,
14 TYPE_GUI,
15 TYPE_INDENT,
16 TYPE_FEATURE
19 struct mod_t {
20 int Type;
21 int ID;
22 char * Version;
23 char * Name;
24 char Enabled;
25 char * mod_file;
26 void (*short_info) ();
27 void (*long_info) ();
28 void (*usage) ();
31 struct mod_feature {
32 struct mod_t mod;
33 char (*opt) (DArray * d_opts, int * pos);
34 char (*opt2) (DArray * d_opts, int * pos);
37 /* Language plugin. */
38 struct mod_language {
39 struct mod_t mod;
40 char *language;
41 char *(*the) (struct tt_state_t *d_tt_state); // --the-tt
42 int (*make_ctags) (char *f_name, FILE *ofile); // SilentBob --make-ctags code body.
43 int (*call_tags) (char *f_name); // SilentBob --call-tags code body.
44 int (*print_tags) (char * f_name); // tags <tag>
45 void (*file) (DArray * d_files); // sb <files> --file
48 int modding_init ();
49 int modding_start (int i_cmd);
50 int modding_load_plugin (char * name, char * path);
51 void mod_plugin_info (int ID);
52 #endif