Merge from emacs-23; up to 2010-06-29T18:17:31Z!cyd@stupidchicken.com.
[bpt/emacs.git] / oldXMenu / XMenuInt.h
CommitLineData
e745ede7 1/* Copyright Massachusetts Institute of Technology 1985 */
e4187bb0
GM
2
3#include "copyright.h"
4
e745ede7
DL
5
6/*
7 * XMenu: MIT Project Athena, X Window system menu package
8 *
9 * XMenuInternal.h - Internal menu system include file for the
10 * MIT Project Athena XMenu X window system
11 * menu package.
177c0ea7 12 *
e745ede7
DL
13 * Author: Tony Della Fera, DEC
14 * October, 1985
15 */
16
17#ifndef _XMenuInternal_h_
18#define _XMenuInternal_h_
19
20/* Avoid warnings about redefining NULL by including <stdio.h> first;
21 the other file which wants to define it (<stddef.h> on Ultrix
22 systems) can deal if NULL is already defined, but <stdio.h> can't. */
23#include <stdio.h>
24#include <X11/Xlib.h>
25#include "X10.h"
26#include "XMenu.h"
27
28#define min(x, y) ((x) <= (y) ? (x) : (y))
29#define max(x, y) ((x) >= (y) ? (x) : (y))
30#define abs(a) ((a) < 0 ? -(a) : (a))
31
32#define _X_FAILURE -1
33
34#define _SUCCESS 1
35#define _FAILURE -1
36
37/*
38 * XMenu internal event handler variable.
39 */
b782e2d7 40extern int (*_XMEventHandler)(XEvent*);
e745ede7
DL
41
42#ifndef Pixel
43#define Pixel unsigned long
44#endif
45
46/*
47 * Internal routine declarations.
48 */
55660072
PE
49void _XMWinQueInit(void);
50int _XMWinQueAddPane(Display *display, XMenu *menu, XMPane *p_ptr);
51int _XMWinQueAddSelection(Display *display, XMenu *menu, XMSelect *s_ptr);
52int _XMWinQueFlush(Display *display, XMenu *menu, XMPane *pane, XMSelect *select);
53XMPane *_XMGetPanePtr(XMenu *menu, int p_num);
54XMSelect *_XMGetSelectionPtr(XMPane *p_ptr, int s_num);
55void _XMRecomputeGlobals(Display *display, XMenu *menu);
56int _XMRecomputePane(Display *display, XMenu *menu, XMPane *p_ptr, int p_num);
57int _XMRecomputeSelection(Display *display, XMenu *menu, XMSelect *s_ptr, int s_num);
58void _XMTransToOrigin(Display *display, XMenu *menu, XMPane *p_ptr, XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y);
59void _XMRefreshPane(Display *display, XMenu *menu, XMPane *pane);
60void _XMRefreshSelection(Display *display, XMenu *menu, XMSelect *select);
61void emacs_insque (void *elem, void *prev);
62void emacs_remque (void *elem);
63void XDeleteAssoc(Display *dpy, XAssocTable *table, XID x_id);
64void XDestroyAssocTable(XAssocTable *table);
65void XMakeAssoc(Display *dpy, XAssocTable *table, XID x_id, void *data);
66void XDeleteAssoc(Display *dpy, XAssocTable *table, XID x_id);
e745ede7
DL
67
68#endif
69/* Don't add stuff after this #endif */