XMenuInt.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. /* Avoid warnings about redefining NULL by including <stdio.h> first;
  16. the other file which wants to define it (<stddef.h> on Ultrix
  17. systems) can deal if NULL is already defined, but <stdio.h> can't. */
  18. #include <stdio.h>
  19. #include <X11/Xlib.h>
  20. #include "X10.h"
  21. #include "XMenu.h"
  22. #define min(x, y) ((x) <= (y) ? (x) : (y))
  23. #define max(x, y) ((x) >= (y) ? (x) : (y))
  24. #define abs(a) ((a) < 0 ? -(a) : (a))
  25. #define _X_FAILURE -1
  26. #define _SUCCESS 1
  27. #define _FAILURE -1
  28. /*
  29. * XMenu internal event handler variable.
  30. */
  31. extern int (*_XMEventHandler)(XEvent*);
  32. #ifndef Pixel
  33. #define Pixel unsigned long
  34. #endif
  35. /*
  36. * Internal routine declarations.
  37. */
  38. void _XMWinQueInit(void);
  39. int _XMWinQueAddPane(Display *display, XMenu *menu, XMPane *p_ptr);
  40. int _XMWinQueAddSelection(Display *display, XMenu *menu, XMSelect *s_ptr);
  41. int _XMWinQueFlush(Display *display, XMenu *menu, XMPane *pane, XMSelect *select);
  42. XMPane *_XMGetPanePtr(XMenu *menu, int p_num);
  43. XMSelect *_XMGetSelectionPtr(XMPane *p_ptr, int s_num);
  44. void _XMRecomputeGlobals(Display *display, XMenu *menu);
  45. int _XMRecomputePane(Display *display, XMenu *menu, XMPane *p_ptr, int p_num);
  46. int _XMRecomputeSelection(Display *display, XMenu *menu, XMSelect *s_ptr, int s_num);
  47. void _XMTransToOrigin(Display *display, XMenu *menu, XMPane *p_ptr, XMSelect *s_ptr, int x_pos, int y_pos, int *orig_x, int *orig_y);
  48. void _XMRefreshPane(Display *display, XMenu *menu, XMPane *pane);
  49. void _XMRefreshSelection(Display *display, XMenu *menu, XMSelect *select);
  50. void emacs_insque (void *elem, void *prev);
  51. void emacs_remque (void *elem);
  52. void XDeleteAssoc(Display *dpy, XAssocTable *table, XID x_id);
  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 */