ButtonP.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /******************************************************************************
  24. *******************************************************************************
  25. *
  26. * (c) Copyright 1992 HEWLETT-PACKARD COMPANY
  27. * ALL RIGHTS RESERVED
  28. *
  29. *******************************************************************************
  30. ******************************************************************************/
  31. #ifndef _DtButtonP_h
  32. #define _DtButtonP_h
  33. #include <Xm/XmP.h>
  34. #include "Button.h"
  35. #include <Xm/GadgetP.h>
  36. #include <Xm/ManagerP.h>
  37. #if defined(__cplusplus) || defined(c_plusplus)
  38. extern "C" {
  39. #endif
  40. /* Arrow class structure */
  41. typedef struct _DtButtonGadgetClassPart
  42. {
  43. caddr_t extension;
  44. } DtButtonGadgetClassPart;
  45. /* Full class record declaration for Arrow class */
  46. typedef struct _DtButtonGadgetClassRec
  47. {
  48. RectObjClassPart rect_class;
  49. XmGadgetClassPart gadget_class;
  50. DtButtonGadgetClassPart button_class;
  51. } DtButtonGadgetClassRec;
  52. externalref DtButtonGadgetClassRec dtButtonGadgetClassRec;
  53. /* The button instance record */
  54. typedef struct _DtButtonGadgetPart
  55. {
  56. XtCallbackList callback;
  57. Boolean armed;
  58. GC gc_normal;
  59. GC gc_clip;
  60. GC gc_background;
  61. GC gc_armed_bg;
  62. XtIntervalId timer;
  63. unsigned char multiClick; /* KEEP/DISCARD resource */
  64. int click_count;
  65. Time armTimeStamp;
  66. Time activateTimeStamp;
  67. Widget subpanel;
  68. XtPointer push_function;
  69. XtPointer push_argument;
  70. String image_name;
  71. Pixmap pixmap;
  72. Pixmap mask;
  73. Dimension pixmap_width;
  74. Dimension pixmap_height;
  75. int cursor_font;
  76. Pixel arm_color;
  77. } DtButtonGadgetPart;
  78. /* Full instance record declaration */
  79. typedef struct _DtButtonGadgetRec
  80. {
  81. ObjectPart object;
  82. RectObjPart rectangle;
  83. XmGadgetPart gadget;
  84. DtButtonGadgetPart button;
  85. } DtButtonGadgetRec;
  86. #define B_Expose(w,e,r) \
  87. (w -> core.widget_class->core_class.expose)(w,e,r)
  88. #define B_ArmColor(w) (w -> button.arm_color)
  89. #define B_CursorFont(w) (w -> button.cursor_font)
  90. #define B_Armed(w) (w -> button.armed)
  91. #define B_PushFunction(w) (w -> button.push_function)
  92. #define B_PushArgument(w) (w -> button.push_argument)
  93. #define B_Subpanel(w) (w -> button.subpanel)
  94. #define B_Callback(w) (w -> button.callback)
  95. #define B_PixmapWidth(w) (w -> button.pixmap_width)
  96. #define B_PixmapHeight(w) (w -> button.pixmap_height)
  97. #define B_ImageName(w) (w -> button.image_name)
  98. #define B_Mask(w) (w -> button.mask)
  99. #define B_Pixmap(w) (w -> button.pixmap)
  100. #define M_TopShadowColor(w) (w -> manager.top_shadow_color)
  101. #define M_BottomShadowColor(w) (w -> manager.bottom_shadow_color)
  102. #if defined(__cplusplus) || defined(c_plusplus)
  103. } /* Close scope of 'extern "C"' declaration which encloses file. */
  104. #endif
  105. #endif /* _DtButtonP_h */
  106. /* DON'T ADD ANYTHING AFTER THIS #endif */