File: plugin.h

package info (click to toggle)
screem 0.2.1-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,748 kB
  • ctags: 2,270
  • sloc: ansic: 26,366; sh: 7,453; makefile: 512; sed: 93; perl: 18
file content (41 lines) | stat: -rw-r--r-- 1,257 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef PLUGIN_H
#define PLUGIN_H

void scan_plugins( GtkWidget *output );
GtkWidget* screem_build_scripts_menu( void );


/* Script plugins:
 *
 * stdout requests:
 *   plugins can make requests on stdout, the following are supported:
 * CURSOR_POS [ pos ]  - if a pos is given the plugin is setting the cursor
 *                       position, otherwise requesting it
 * INSERT text pos  - insert text at position pos, if pos == -1 then 
 *                    insert at the current cursor position
 * DELETE num [ pos ] - delete num chars at pos or cursor position
 *
 * BUFFER - buffer the current pages text
 *
 * CURRENT - requests the current pages text be sent
 *
 * 
 *
 */

/* a value based on these is to be outputed by every script plugin when
   given the init argument */
typedef enum _ScriptFeatures {
	INIT = 0,  /* 0 as its assumed to be always present, included for 
		      completness */
	MODAL = 1 << 0,  /* the plugin wants to run modally */
} ScriptFeatures;

typedef struct _Script {
	gchar *exec;     /* the name of the program to execute */
	gboolean modal;  /* if the plugin in is to be executed modally */
	gint features;   /* a bitmap of arguments this plugin supports */
	gchar *path;     /* the menu path */
} Script;

#endif