winmultiwindowclass.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. #if !defined(WINMULTIWINDOWCLASS_H)
  2. #define WINMULTIWINDOWCLASS_H
  3. /*
  4. *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
  5. *
  6. *Permission is hereby granted, free of charge, to any person obtaining
  7. * a copy of this software and associated documentation files (the
  8. *"Software"), to deal in the Software without restriction, including
  9. *without limitation the rights to use, copy, modify, merge, publish,
  10. *distribute, sublicense, and/or sell copies of the Software, and to
  11. *permit persons to whom the Software is furnished to do so, subject to
  12. *the following conditions:
  13. *
  14. *The above copyright notice and this permission notice shall be
  15. *included in all copies or substantial portions of the Software.
  16. *
  17. *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. *NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
  21. *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
  22. *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  23. *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. *
  25. *Except as contained in this notice, the name of the XFree86 Project
  26. *shall not be used in advertising or otherwise to promote the sale, use
  27. *or other dealings in this Software without prior written authorization
  28. *from the XFree86 Project.
  29. *
  30. * Authors: Earle F. Philhower, III
  31. */
  32. /*
  33. * Structures
  34. */
  35. typedef struct {
  36. long flags; /* marks which fields in this structure are defined */
  37. Bool input; /* does this application rely on the window manager to
  38. get keyboard input? */
  39. int initial_state; /* see below */
  40. Pixmap icon_pixmap; /* pixmap to be used as icon */
  41. Window icon_window; /* window to be used as icon */
  42. int icon_x, icon_y; /* initial position of icon */
  43. Pixmap icon_mask; /* icon mask bitmap */
  44. XID window_group; /* id of related window group */
  45. /* this structure may be extended in the future */
  46. } WinXWMHints;
  47. /* Window manager hints mask bits */
  48. #define InputHint (1L << 0)
  49. #define StateHint (1L << 1)
  50. #define IconPixmapHint (1L << 2)
  51. #define IconWindowHint (1L << 3)
  52. #define IconPositionHint (1L << 4)
  53. #define IconMaskHint (1L << 5)
  54. #define WindowGroupHint (1L << 6)
  55. #define UrgencyHint (1L << 8)
  56. #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPositionHint|IconMaskHint|WindowGroupHint)
  57. /*
  58. * new version containing base_width, base_height, and win_gravity fields;
  59. * used with WM_NORMAL_HINTS.
  60. */
  61. typedef struct {
  62. long flags; /* marks which fields in this structure are defined */
  63. int x, y; /* obsolete for new window mgrs, but clients */
  64. int width, height; /* should set so old wm's don't mess up */
  65. int min_width, min_height;
  66. int max_width, max_height;
  67. int width_inc, height_inc;
  68. struct {
  69. int x; /* numerator */
  70. int y; /* denominator */
  71. } min_aspect, max_aspect;
  72. int base_width, base_height; /* added by ICCCM version 1 */
  73. int win_gravity; /* added by ICCCM version 1 */
  74. } WinXSizeHints;
  75. /*
  76. * The next block of definitions are for window manager properties that
  77. * clients and applications use for communication.
  78. */
  79. /* flags argument in size hints */
  80. #define USPosition (1L << 0) /* user specified x, y */
  81. #define USSize (1L << 1) /* user specified width, height */
  82. #define PPosition (1L << 2) /* program specified position */
  83. #define PSize (1L << 3) /* program specified size */
  84. #define PMinSize (1L << 4) /* program specified minimum size */
  85. #define PMaxSize (1L << 5) /* program specified maximum size */
  86. #define PResizeInc (1L << 6) /* program specified resize increments */
  87. #define PAspect (1L << 7) /* program specified min and max aspect ratios */
  88. #define PBaseSize (1L << 8) /* program specified base for incrementing */
  89. #define PWinGravity (1L << 9) /* program specified window gravity */
  90. /* obsolete */
  91. #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
  92. /*
  93. * Function prototypes
  94. */
  95. int
  96. winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints);
  97. int
  98. winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class);
  99. int
  100. winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role);
  101. int
  102. winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints);
  103. int
  104. winMultiWindowGetWMName(WindowPtr pWin, char **wmName);
  105. int
  106. winMultiWindowGetTransientFor(WindowPtr pWin, Window *ppDaddy);
  107. #endif