RootWin.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. Copyright 1990, 1998 The Open Group
  3. Permission to use, copy, modify, distribute, and sell this software and its
  4. documentation for any purpose is hereby granted without fee, provided that
  5. the above copyright notice appear in all copies and that both that
  6. copyright notice and this permission notice appear in supporting
  7. documentation.
  8. The above copyright notice and this permission notice shall be included
  9. in all copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  11. OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  12. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  13. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
  14. OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  15. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  16. OTHER DEALINGS IN THE SOFTWARE.
  17. Except as contained in this notice, the name of The Open Group shall
  18. not be used in advertising or otherwise to promote the sale, use or
  19. other dealings in this Software without prior written authorization
  20. from The Open Group.
  21. */
  22. #include <X11/IntrinsicP.h>
  23. #include <X11/StringDefs.h>
  24. #include "RootWinP.h"
  25. static void Realize ( Widget w, XtValueMask *value_mask, XSetWindowAttributes *attributes );
  26. RootWindowClassRec rootWindowClassRec = {
  27. { /* core fields */
  28. /* superclass */ (WidgetClass) &widgetClassRec,
  29. /* class_name */ "RootWindow",
  30. /* widget_size */ sizeof(RootWindowRec),
  31. /* class_initialize */ NULL,
  32. /* class_part_initialize */ NULL,
  33. /* class_inited */ FALSE,
  34. /* initialize */ NULL,
  35. /* initialize_hook */ NULL,
  36. /* realize */ Realize,
  37. /* actions */ NULL,
  38. /* num_actions */ 0,
  39. /* resources */ NULL,
  40. /* num_resources */ 0,
  41. /* xrm_class */ NULLQUARK,
  42. /* compress_motion */ TRUE,
  43. /* compress_exposure */ TRUE,
  44. /* compress_enterleave */ TRUE,
  45. /* visible_interest */ FALSE,
  46. /* destroy */ NULL,
  47. /* resize */ NULL,
  48. /* expose */ NULL,
  49. /* set_values */ NULL,
  50. /* set_values_hook */ NULL,
  51. /* set_values_almost */ XtInheritSetValuesAlmost,
  52. /* get_values_hook */ NULL,
  53. /* accept_focus */ NULL,
  54. /* version */ XtVersion,
  55. /* callback_private */ NULL,
  56. /* tm_table */ NULL,
  57. /* query_geometry */ XtInheritQueryGeometry,
  58. /* display_accelerator */ XtInheritDisplayAccelerator,
  59. /* extension */ NULL
  60. },
  61. { /* rootWindow fields */
  62. /* empty */ 0
  63. }
  64. };
  65. WidgetClass rootWindowWidgetClass = (WidgetClass)&rootWindowClassRec;
  66. /*ARGSUSED*/
  67. static void
  68. Realize(Widget w, XtValueMask *value_mask, XSetWindowAttributes *attributes)
  69. {
  70. w->core.window = RootWindowOfScreen(w->core.screen);
  71. }