Icon.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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: Icon.h /main/4 1995/10/26 09:32:37 rswiston $ */
  24. /**---------------------------------------------------------------------
  25. ***
  26. *** file: Icon.h
  27. ***
  28. *** project: MotifPlus Widgets
  29. ***
  30. *** description: Public include file for DtIcon gadget class.
  31. ***
  32. ***
  33. *** (c) Copyright 1990 by Hewlett-Packard Company.
  34. ***
  35. ***
  36. ***-------------------------------------------------------------------*/
  37. #ifndef _DtIcon_h
  38. #define _DtIcon_h
  39. #include <Xm/Xm.h>
  40. #include <Dt/DtStrDefs.h>
  41. #ifndef DtIsIcon
  42. #define DtIsIcon(w) XtIsSubclass(w, dtIconGadgetClass)
  43. #endif /* DtIsIcon */
  44. typedef struct _DtIconClassRec * DtIconGadgetClass;
  45. typedef struct _DtIconRec * DtIconGadget;
  46. typedef struct _DtIconCacheObjRec * DtIconCacheObject;
  47. extern Widget _DtCreateIcon(
  48. Widget parent,
  49. String name,
  50. ArgList arglist,
  51. Cardinal argcount) ;
  52. extern Boolean _DtIconGetState(
  53. Widget w) ;
  54. extern void _DtIconSetState(
  55. Widget w,
  56. Boolean state,
  57. Boolean notify) ;
  58. extern Drawable _DtIconDraw(
  59. Widget widget,
  60. Drawable drawable,
  61. Position x,
  62. Position y,
  63. Boolean fill) ;
  64. extern Widget _DtDuplicateIcon(
  65. Widget parent,
  66. Widget widget,
  67. XmString string,
  68. String pixmap,
  69. XtPointer user_data,
  70. Boolean underline) ;
  71. extern Boolean _DtIconSelectInTitle(
  72. Widget widget,
  73. Position pt_x,
  74. Position pt_y) ;
  75. extern XRectangle * _DtIconGetTextExtent(
  76. Widget widget) ;
  77. extern void _DtIconGetIconRects(
  78. DtIconGadget g,
  79. unsigned char *flags,
  80. XRectangle *rect1,
  81. XRectangle *rect2) ;
  82. extern WidgetClass dtIconGadgetClass;
  83. #define XmCR_SELECT XmCR_SINGLE_SELECT
  84. #define XmCR_DROP 50
  85. #define XmCR_POPUP 51
  86. #define XmCR_HIGHLIGHT 52
  87. #define XmCR_UNHIGHLIGHT 53
  88. #define XmCR_SHADOW 54
  89. typedef struct
  90. {
  91. int reason;
  92. XEvent * event;
  93. Boolean set;
  94. } DtIconCallbackStruct;
  95. #define XmPIXMAP_TOP 0
  96. #define XmPIXMAP_BOTTOM 1
  97. #define XmPIXMAP_LEFT 2
  98. #define XmPIXMAP_RIGHT 3
  99. #define XmPIXMAP_MIDDLE 4
  100. #define XmSTRING_BOTTOM 0
  101. #define XmSTRING_TOP 1
  102. #define XmSTRING_RIGHT 2
  103. #define XmSTRING_LEFT 3
  104. #define XmICON_LABEL 0
  105. #define XmICON_BUTTON 1
  106. #define XmICON_TOGGLE 2
  107. #define XmICON_DRAG 3
  108. #define XmFILL_NONE 0
  109. #define XmFILL_PARENT 1
  110. #define XmFILL_SELF 2
  111. #define XmFILL_TRANSPARENT 3
  112. #define XmPIXMAP_RECT 0x01
  113. #define XmLABEL_RECT 0x02
  114. #define DtRECTANGLE 0
  115. #define DtNON_RECTANGLE 1
  116. #endif /* _XmIcon_h */
  117. /* DON'T ADD ANYTHING AFTER THIS #endif */