Updated source, makefile for x86 and x86_64 is ready
[ArenaLive.git] / glugin.h
blob842069d629ce594439d497f6a486d605bdf4e63a
3 #define MOZ_X11
4 #include "npapi.h"
5 #include "npupp.h"
7 void Log (const char *, ...);
9 #define pdof(x) ((pluginData *) (x->pdata))
11 typedef struct pluginData_t {
12 /* UNIX part */
13 Window win;
14 pid_t child;
15 FILE *pr, *pw;
16 Display *dpy;
18 int has_window;
20 /* common part */
21 void (*swapbuffers) (struct pluginData_t *);
22 void (*getsize) (struct pluginData_t *, int *, int *); /* TODO */
24 int exit_request;
25 int exit_ack;
27 /* html tag parameters */
28 char *conparam;
29 int action;
31 /* guest handlers */
32 void (*handle_newstream) (struct pluginData_t *, NPStream *);
33 void (*handle_destroystream) (struct pluginData_t *, NPStream *);
34 void (*handle_write) (struct pluginData_t *, NPStream *, int32, int32, void *);
35 } pluginData;
37 void glugin_proc (pluginData *pd);
40 //op number, unsigned int
41 #define gln_new_stream 1 /* stream * */
42 #define gln_stream_data 2 /* stream *, data offset, data size, data */
43 #define gln_destroy_stream 3 /* stream * */
44 #define gln_request_get 4 /* url size, url */
45 #define gln_request_post 5 /* url size, data size, url, data */
47 void host_newstream (pluginData *, NPStream *);
48 void host_destroystream (pluginData *, NPStream *);
49 void host_write (pluginData *, NPStream *, int32, int32, void *);
50 void host_read_guest_requests (pluginData *);
51 void guest_read_host_requests (pluginData *);
53 extern int plugin_action (pluginData *pd);