WmOL.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. * (c) Copyright 1989 Sun Microsystems, Inc.
  25. * (c) Copyright 1993 HEWLETT-PACKARD COMPANY
  26. * ALL RIGHTS RESERVED
  27. */
  28. #ifndef _WM_OL_H
  29. #define _WM_OL_H
  30. /*
  31. * Property Names
  32. */
  33. #define OL_WIN_ATTR "_OL_WIN_ATTR"
  34. #define OL_DECOR_ADD "_OL_DECOR_ADD"
  35. #define OL_DECOR_DEL "_OL_DECOR_DEL"
  36. /*
  37. * Decoration atoms
  38. */
  39. #define OL_DECOR_RESIZE "_OL_DECOR_RESIZE"
  40. #define OL_DECOR_FOOTER "_OL_DECOR_FOOTER"
  41. #define OL_DECOR_HEADER "_OL_DECOR_HEADER"
  42. #define OL_DECOR_PIN "_OL_DECOR_PIN"
  43. #define OL_DECOR_CLOSE "_OL_DECOR_CLOSE"
  44. #define OL_DECOR_ICON_NAME "_OL_DECOR_ICON_NAME"
  45. #define OL_PIN_IN "_OL_PIN_IN"
  46. #define OL_PIN_OUT "_OL_PIN_OUT"
  47. /*
  48. * Window types
  49. */
  50. #define OL_WT_BASE "_OL_WT_BASE"
  51. #define OL_WT_CMD "_OL_WT_CMD"
  52. #define OL_WT_NOTICE "_OL_WT_NOTICE"
  53. #define OL_WT_HELP "_OL_WT_HELP"
  54. #define OL_WT_OTHER "_OL_WT_OTHER"
  55. /*
  56. * Menu Types
  57. */
  58. #define OL_MENU_LIMITED "_OL_MENU_LIMITED"
  59. #define OL_MENU_FULL "_OL_MENU_FULL"
  60. /*
  61. * Structure of Open Look window attribute property
  62. */
  63. typedef struct _OLWinAttr {
  64. unsigned long flags;
  65. Atom win_type;
  66. Atom menu_type;
  67. unsigned long pin_initial_state;
  68. unsigned long cancel;
  69. } OLWinAttr;
  70. #define OLWINATTRLENGTH (sizeof(OLWinAttr)/sizeof(unsigned long))
  71. typedef struct _old_OLWinAttr {
  72. Atom win_type;
  73. Atom menu_type;
  74. unsigned long pin_initial_state;
  75. } old_OLWinAttr;
  76. #define OLDOLWINATTRLENGTH (sizeof(old_OLWinAttr)/sizeof(unsigned long))
  77. /* pin states */
  78. #define PIN_OUT 0
  79. #define PIN_IN 1
  80. /*
  81. * Values for flags in OLWinAttr
  82. */
  83. #define WA_WINTYPE (1<<0)
  84. #define WA_MENUTYPE (1<<1)
  85. #define WA_PINSTATE (1<<2)
  86. #define WA_CANCEL (1<<3)
  87. #define ENTIRE_CONTENTS (10000000L)
  88. /*
  89. * Bit Flags for OL Window Decoration
  90. */
  91. #define OLDecorHeader (1L<<0)
  92. #define OLDecorFooter (1L<<1)
  93. #define OLDecorPushPin (1L<<2)
  94. #define OLDecorCloseButton (1L<<3)
  95. #define OLDecorResizable (1L<<4)
  96. #define OLDecorIconName (1L<<5)
  97. #define OLDecorWarpToPin (1L<<6)
  98. /*
  99. * Public Functions
  100. */
  101. extern Boolean HasOpenLookHints( ClientData *pCD );
  102. extern OLWinAttr * GetOLWinAttr( ClientData *pCD );
  103. extern Boolean GetOLDecorFlags(ClientData *pCD, Atom property,
  104. unsigned long *pDecor);
  105. extern void InitOLCompat(void);
  106. extern void ProcessOLDecoration(ClientData *pCD);
  107. /*
  108. * Macros (public pseudo-functions)
  109. */
  110. #define GetOLDecorAdd(pcd,ptr) (GetOLDecorFlags(pcd,wmGD.xa_OL_DECOR_ADD,ptr))
  111. #define GetOLDecorDel(pcd,ptr) (GetOLDecorFlags(pcd,wmGD.xa_OL_DECOR_DEL,ptr))
  112. /* Do not add anything after the following #endif */
  113. #endif /* _WM_OL_H */