XMenuInt.h 2.2 KB

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