ControlP.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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. /* $XConsortium: ControlP.h /main/6 1996/03/25 11:17:48 rswiston $ */
  24. /**---------------------------------------------------------------------
  25. ***
  26. *** file: ControlP.h
  27. ***
  28. *** project: MotifPlus Widgets
  29. ***
  30. *** description: Private include file for DtControl class.
  31. ***
  32. ***
  33. *** (c) Copyright 1992 by Hewlett-Packard Company.
  34. ***
  35. ***
  36. ***-------------------------------------------------------------------*/
  37. #ifndef _DtControlP_h
  38. #define _DtControlP_h
  39. #include <Xm/XmP.h>
  40. #include <Dt/IconP.h>
  41. #include <Dt/Control.h>
  42. typedef struct _DtControlCacheObjClassPart
  43. {
  44. XtPointer dummy;
  45. } DtControlCacheObjClassPart;
  46. typedef struct _DtControlCacheObjClassRec /* label cache class record */
  47. {
  48. ObjectClassPart object_class;
  49. XmExtClassPart ext_class;
  50. DtControlCacheObjClassPart control_class_cache;
  51. } DtControlCacheObjClassRec;
  52. externalref DtControlCacheObjClassRec dtControlCacheObjClassRec;
  53. /* The Control Gadget Cache instance record */
  54. typedef struct _DtControlCacheObjPart
  55. {
  56. XtPointer dummy;
  57. } DtControlCacheObjPart;
  58. typedef struct _DtControlCacheObjRec
  59. {
  60. ObjectPart object;
  61. XmExtPart ext;
  62. DtControlCacheObjPart control_cache;
  63. } DtControlCacheObjRec;
  64. /*-------------------------------------------------------------
  65. ** Class Structure
  66. */
  67. /* Class Part
  68. */
  69. typedef struct _DtControlClassPart
  70. {
  71. XmCacheClassPartPtr cache_part;
  72. caddr_t extension;
  73. } DtControlClassPart;
  74. /* Full Class Record
  75. */
  76. typedef struct _DtControlClassRec
  77. {
  78. RectObjClassPart rect_class;
  79. XmGadgetClassPart gadget_class;
  80. DtIconClassPart icon_class;
  81. DtControlClassPart control_class;
  82. } DtControlClassRec;
  83. /* Actual Class
  84. */
  85. extern DtControlClassRec dtControlClassRec;
  86. /*-------------------------------------------------------------
  87. ** Instance Structure
  88. */
  89. /* Instance Part
  90. */
  91. typedef struct _DtControlPart
  92. {
  93. XtPointer push_function;
  94. XtPointer push_argument;
  95. String push_action;
  96. int num_push_images;
  97. int max_push_images;
  98. int push_image_position;
  99. int *push_delays;
  100. Pixmap *push_pixmaps;
  101. Pixmap *push_masks;
  102. String drop_action;
  103. int num_drop_images;
  104. int max_drop_images;
  105. int drop_image_position;
  106. int *drop_delays;
  107. Pixmap *drop_pixmaps;
  108. Pixmap *drop_masks;
  109. Widget subpanel;
  110. Pixmap alt_pix;
  111. Pixmap alt_mask;
  112. String alt_image;
  113. XmString alt_string;
  114. Dimension alt_string_width;
  115. Dimension alt_string_height;
  116. String format;
  117. String format_jp;
  118. String file_name;
  119. long file_size;
  120. XtIntervalId monitor_timer;
  121. int monitor_time;
  122. Boolean chime;
  123. Boolean file_changed;
  124. Boolean _do_update;
  125. Boolean use_embossed_text;
  126. Boolean use_label_adj;
  127. unsigned char control_type;
  128. GC top_shadow_gc;
  129. GC bottom_shadow_gc;
  130. XtIntervalId click_timer;
  131. int click_time;
  132. short busy;
  133. int blink_elapsed;
  134. int max_blink_time;
  135. int blink_time;
  136. XtIntervalId blink_timer;
  137. XtIntervalId date_timer;
  138. XtIntervalId push_animation_timer;
  139. XtIntervalId drop_animation_timer;
  140. } DtControlPart;
  141. /* Full Instance Record
  142. */
  143. typedef struct _DtControlRec
  144. {
  145. ObjectPart object;
  146. RectObjPart rectangle;
  147. XmGadgetPart gadget;
  148. DtIconPart icon;
  149. DtControlPart control;
  150. } DtControlRec;
  151. /*-------------------------------------------------------------
  152. ** Class and Instance Macros
  153. */
  154. /* DtControl Class Macros
  155. */
  156. /* DtControl Instance Macros
  157. */
  158. #define G_Format(g) (g -> control.format)
  159. #define G_TopShadowGC(g) (g -> control.top_shadow_gc)
  160. #define G_BottomShadowGC(g) (g -> control.bottom_shadow_gc)
  161. #define G_Busy(g) (g -> control.busy)
  162. #define G_PushImagePosition(g) (g -> control.push_image_position)
  163. #define G_NumPushImages(g) (g -> control.num_push_images)
  164. #define G_MaxPushImages(g) (g -> control.max_push_images)
  165. #define G_PushDelays(g) (g -> control.push_delays)
  166. #define G_PushPixmaps(g) (g -> control.push_pixmaps)
  167. #define G_PushMasks(g) (g -> control.push_masks)
  168. #define G_DropImagePosition(g) (g -> control.drop_image_position)
  169. #define G_NumDropImages(g) (g -> control.num_drop_images)
  170. #define G_MaxDropImages(g) (g -> control.max_drop_images)
  171. #define G_DropDelays(g) (g -> control.drop_delays)
  172. #define G_DropPixmaps(g) (g -> control.drop_pixmaps)
  173. #define G_DropMasks(g) (g -> control.drop_masks)
  174. #define G_DropAction(g) (g -> control.drop_action)
  175. #define G_PushAction(g) (g -> control.push_action)
  176. #define G__DoUpdate(g) (g -> control._do_update)
  177. #define G_PushFunction(g) (g -> control.push_function)
  178. #define G_PushArgument(g) (g -> control.push_argument)
  179. #define G_Subpanel(g) (g -> control.subpanel)
  180. #define G_AltMask(g) (g -> control.alt_mask)
  181. #define G_AltPix(g) (g -> control.alt_pix)
  182. #define G_AltString(g) (g -> control.alt_string)
  183. #define G_AltStringWidth(g) (g -> control.alt_string_width)
  184. #define G_AltStringHeight(g) (g -> control.alt_string_height)
  185. #define G_ControlType(g) (g -> control.control_type)
  186. #define G_AltImage(g) (g -> control.alt_image)
  187. #define G_FileChanged(g) (g -> control.file_changed)
  188. #define G_FileName(g) (g -> control.file_name)
  189. #define G_FileSize(g) (g -> control.file_size)
  190. #define G_Chime(g) (g -> control.chime)
  191. #define G_MonitorTimer(g) (g -> control.monitor_timer)
  192. #define G_MonitorTime(g) (g -> control.monitor_time)
  193. #define G_ClickTime(g) (g -> control.click_time)
  194. #define G_ClickTimer(g) (g -> control.click_timer)
  195. #define G_DateTimer(g) (g -> control.date_timer)
  196. #define G_PushAnimationTimer(g) (g -> control.push_animation_timer)
  197. #define G_DropAnimationTimer(g) (g -> control.drop_animation_timer)
  198. #define G_BlinkCount(g) (g -> control.blink_count)
  199. #define G_BlinkElapsed(g) (g -> control.blink_elapsed)
  200. #define G_MaxBlinkTime(g) (g -> control.max_blink_time)
  201. #define G_BlinkTime(g) (g -> control.blink_time)
  202. #define G_BlinkTimer(g) (g -> control.blink_timer)
  203. #define G_BlinkTime(g) (g -> control.blink_time)
  204. #define G_UseEmbossedText(g) (g -> control.use_embossed_text)
  205. #define G_UseLabelAdjustment(g) (g -> control.use_label_adj)
  206. #endif /* _DtControlP_h */
  207. /* DON'T ADD ANYTHING AFTER THIS #endif */