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 #ifndef _XMenuInternal_h_
36 #define _XMenuInternal_h_
37
38 #include <config.h>
39
40 #include <attribute.h>
41
42
43
44
45 #include <stdio.h>
46 #include <X11/Xlib.h>
47 #include "X10.h"
48 #include "XMenu.h"
49
50 #define min(x, y) ((x) <= (y) ? (x) : (y))
51 #define max(x, y) ((x) >= (y) ? (x) : (y))
52 #define abs(a) ((a) < 0 ? -(a) : (a))
53
54 #define _X_FAILURE -1
55
56 #define _SUCCESS 1
57 #define _FAILURE -1
58
59
60
61
62 extern int (*_XMEventHandler)(XEvent*);
63
64 #ifndef Pixel
65 #define Pixel unsigned long
66 #endif
67
68
69
70
71 void _XMWinQueInit(void);
72 int _XMWinQueAddPane(Display *display, XMenu *menu, XMPane *p_ptr);
73 int _XMWinQueAddSelection(Display *display, XMenu *menu, XMSelect *s_ptr);
74 int _XMWinQueFlush(Display *display, XMenu *menu, XMPane *pane, XMSelect *select);
75 XMPane *_XMGetPanePtr(XMenu *menu, int p_num);
76 XMSelect *_XMGetSelectionPtr(XMPane *p_ptr, int s_num);
77 void _XMRecomputeGlobals(Display *display, XMenu *menu);
78 int _XMRecomputePane(Display *display, XMenu *menu, XMPane *p_ptr, int p_num);
79 int _XMRecomputeSelection(Display *display, XMenu *menu, XMSelect *s_ptr, int s_num);
80 void _XMTransToOrigin(Display *display, XMenu *menu, XMPane *p_ptr, XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y);
81 void _XMRefreshPane(Display *display, XMenu *menu, XMPane *pane);
82 void _XMRefreshSelection(Display *display, XMenu *menu, XMSelect *select);
83 void emacs_insque (void *elem, void *prev);
84 void emacs_remque (void *elem);
85 void XDestroyAssocTable(XAssocTable *table);
86 void XMakeAssoc(Display *dpy, XAssocTable *table, XID x_id, void *data);
87 void XDeleteAssoc(Display *dpy, XAssocTable *table, XID x_id);
88
89 #endif
90