1 
2 #ifndef _GUI_H_
3 #define _GUI_H_
4 #ifdef GUI
5 
6 #define         GUISUBMENU             1
7 #define         GUIMENUITEM            (1 << 1)
8 #define         GUIIAMENUITEM          (1 << 2)
9 #define         GUIDEFMENUITEM         (1 << 3)
10 #define         GUIBRKMENUITEM         (1 << 4)
11 #define         GUISEPARATOR           (1 << 5)
12 #define         GUISHARED              (1 << 6)
13 #define         GUIBRKSUBMENU          (1 << 7)
14 #define         GUICHECKEDMENUITEM     (1 << 8)
15 #define         GUINDMENUITEM          (1 << 9)
16 #define         GUICHECKMENUITEM       (1 << 10)
17 
18 #ifdef __EMXPM__
19 #include "PMbitchx.h"
20 #elif defined(GTK)
21 #include "gtkbitchx.h"
22 #elif defined(WIN32)
23 #include "winbitchx.h"
24 #endif
25 
26 #define EVNONE    	0
27 #define EVMENU    	1
28 #define EVFOCUS   	2
29 #define EVREFRESH 	3
30 #define EVSTRACK  	4
31 #define EVSUP     	5
32 #define EVSDOWN   	6
33 #define EVSUPPG   	7
34 #define EVSDOWNPG 	8
35 #define EVKEY     	9
36 #define EVFILE    	10
37 #define EVTITLE		11
38 #define EVPASTE		12
39 #define EVDELETE	13
40 
41 #define COLOR_INACTIVE	0
42 #define COLOR_ACTIVE	1
43 #define COLOR_HIGHLIGHT	2
44 
45 #include "struct.h"
46 /* These are all the functions that each GUI module must provide for
47    a clean port to other GUI OSes.
48 
49    gui_init() - main initialization routine.
50    */
51 void gui_init(void);
52 void gui_clreol(void);
53 void gui_gotoxy(int col, int row);
54 void gui_clrscr(void);
55 void gui_left(int num);
56 void gui_right(int num);
57 void gui_scroll(int top, int bot, int n);
58 void gui_flush(void);
59 void gui_puts(unsigned char *buffer);
60 void gui_new_window(Screen *new, Window *win);
61 void gui_kill_window(Screen *killscreen);
62 void gui_settitle(char *titletext, Screen *screen);
63 void gui_font_dialog(Screen *screen);
64 void gui_file_dialog(char *type, char *path, char *title, char *ok, char *apply, char *code, char *szButton);
65 void gui_properties_notebook(void);
66 void gui_msgbox(void);
67 void gui_popupmenu(char *menuname);
68 void gui_paste(char *args);
69 void gui_setfocus(Screen *screen);
70 void gui_scrollerchanged(Screen *screen, int position);
71 void gui_query_window_info(Screen *screen, char *fontinfo, int *x, int *y, int *cx, int *cy);
72 void gui_play_sound(char *filename);
73 void gui_get_sound_error(int errnum, char *errstring);
74 void gui_menu(Screen *screen, char *addmenu);
75 void gui_exit(void);
76 void gui_screen(Screen *new);
77 void gui_resize(Screen *new);
78 int gui_send_mci_string(char *mcistring, char *retstring);
79 int gui_isset(Screen *screen, fd_set *rd, int what);
80 int gui_putc(int c);
81 int gui_read(Screen *screen, char *buffer, int maxbufsize);
82 int gui_screen_width(void);
83 int gui_screen_height(void);
84 void gui_setwindowpos(Screen *screen, int x, int y, int cx, int cy, int top, int bottom, int min, int max, int restore, int activate, int size, int position);
85 void gui_font_init(void);
86 void gui_font_set(char *font, Screen *screen);
87 void BX_gui_mutex_lock(void);
88 void BX_gui_mutex_unlock(void);
89 int gui_setmenuitem(char *menuname, int refnum, char *what, char *param);
90 void gui_remove_menurefs(char *menu);
91 void gui_mdi(Window *, char *, int);
92 void gui_update_nicklist(char *);
93 void gui_nicklist_width(int, Screen *);
94 void gui_startup(int argc, char *argv[]);
95 void gui_about_box(char *about_text);
96 void gui_activity(int color);
97 void gui_setfileinfo(char *filename, char *nick, int server);
98 void gui_setfd(fd_set *rd);
99 
100 /* These are just miscellaneous GUI function declarations */
101 MenuStruct *findmenu(char *menuname);
102 void sendevent(unsigned int event, unsigned int window);
103 
104 /* A fix for different systems declaring tputs differently */
105 #ifdef GTK
106 #ifdef __sun__
107 int      gtkputs (const char *str, int n, int (*blah)(int));
108 #else
109 int      gtkputs __P((const char *str, int n, int (*blah)(int)));
110 #endif
111 #define tputs gtkputs
112 #endif
113 
114 #define current_screen      last_input_screen
115 #define INPUT_BUFFER        current_screen->input_buffer
116 #define ADD_TO_INPUT(x)     strmcat(INPUT_BUFFER, (x), INPUT_BUFFER_SIZE);
117 
118 #endif
119 #endif
120