1 /* Copyright Massachusetts Institute of Technology 1985 */
7 * XMenu: MIT Project Athena, X Window system menu package
9 * XMenuInternal.h - Internal menu system include file for the
10 * MIT Project Athena XMenu X window system
13 * Author: Tony Della Fera, DEC
17 #ifndef _XMenuInternal_h_
18 #define _XMenuInternal_h_
22 /* Avoid warnings about redefining NULL by including <stdio.h> first;
23 the other file which wants to define it (<stddef.h> on Ultrix
24 systems) can deal if NULL is already defined, but <stdio.h> can't. */
30 #define min(x, y) ((x) <= (y) ? (x) : (y))
31 #define max(x, y) ((x) >= (y) ? (x) : (y))
32 #define abs(a) ((a) < 0 ? -(a) : (a))
40 * XMenu internal event handler variable.
42 extern int (*_XMEventHandler
)(XEvent
*);
45 #define Pixel unsigned long
49 * Internal routine declarations.
51 void _XMWinQueInit(void);
52 int _XMWinQueAddPane(Display
*display
, XMenu
*menu
, XMPane
*p_ptr
);
53 int _XMWinQueAddSelection(Display
*display
, XMenu
*menu
, XMSelect
*s_ptr
);
54 int _XMWinQueFlush(Display
*display
, XMenu
*menu
, XMPane
*pane
, XMSelect
*select
);
55 XMPane
*_XMGetPanePtr(XMenu
*menu
, int p_num
);
56 XMSelect
*_XMGetSelectionPtr(XMPane
*p_ptr
, int s_num
);
57 void _XMRecomputeGlobals(Display
*display
, XMenu
*menu
);
58 int _XMRecomputePane(Display
*display
, XMenu
*menu
, XMPane
*p_ptr
, int p_num
);
59 int _XMRecomputeSelection(Display
*display
, XMenu
*menu
, XMSelect
*s_ptr
, int s_num
);
60 void _XMTransToOrigin(Display
*display
, XMenu
*menu
, XMPane
*p_ptr
, XMSelect
*s_ptr
, int x_pos
, int y_pos
, int *orig_x
, int *orig_y
);
61 void _XMRefreshPane(Display
*display
, XMenu
*menu
, XMPane
*pane
);
62 void _XMRefreshSelection(Display
*display
, XMenu
*menu
, XMSelect
*select
);
63 void emacs_insque (void *elem
, void *prev
);
64 void emacs_remque (void *elem
);
65 void XDestroyAssocTable(XAssocTable
*table
);
66 void XMakeAssoc(Display
*dpy
, XAssocTable
*table
, XID x_id
, void *data
);
67 void XDeleteAssoc(Display
*dpy
, XAssocTable
*table
, XID x_id
);
70 /* Don't add stuff after this #endif */