Guest User

Untitled

a guest
Jul 21st, 2018
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. Thu Feb 3 20:06:27 CST 2011 Aren Olson <reacocard@gmail.com>
  2. * expose withRegion
  3. Mon Jan 24 14:46:42 CST 2011 Aren Olson <reacocard@gmail.com>
  4. * Expose constructor for Visual
  5. Mon Jan 24 01:10:44 CST 2011 Aren Olson <reacocard@gmail.com>
  6. * Export makeRegion for use in extension libraries
  7. Mon Jan 24 01:10:16 CST 2011 Aren Olson <reacocard@gmail.com>
  8. * Add support for CreateEevent
  9. Mon Jan 24 01:09:29 CST 2011 Aren Olson <reacocard@gmail.com>
  10. * Add class to WindowAttributes
  11. diff -rN -u old-X11/Graphics/X11/Xlib/Extras.hsc new-X11/Graphics/X11/Xlib/Extras.hsc
  12. --- old-X11/Graphics/X11/Xlib/Extras.hsc 2011-02-03 20:08:04.711497969 -0600
  13. +++ new-X11/Graphics/X11/Xlib/Extras.hsc 2011-02-03 20:08:04.714831302 -0600
  14. @@ -212,7 +212,20 @@
  15. , ev_message_type :: !Atom
  16. , ev_data :: ![CInt]
  17. }
  18. -
  19. + | CreateEvent
  20. + { ev_event_type :: !EventType
  21. + , ev_serial :: !CULong
  22. + , ev_send_event :: !Bool
  23. + , ev_event_display :: Display
  24. + , ev_window :: !Window
  25. + , ev_parent :: !Window
  26. + , ev_x :: !CInt
  27. + , ev_y :: !CInt
  28. + , ev_width :: !CInt
  29. + , ev_height :: !CInt
  30. + , ev_border_width :: !CInt
  31. + , ev_override_redirect :: !Bool
  32. + }
  33. deriving ( Show, Typeable )
  34.  
  35. eventTable :: [(EventType, String)]
  36. @@ -613,6 +626,34 @@
  37. , ev_data = dat
  38. }
  39.  
  40. + -------------------------
  41. + -- CreateEvent
  42. + -------------------------
  43. + | type_ == createNotify -> do
  44. + window <- #{peek XCreateWindowEvent, window } p
  45. + parent <- #{peek XCreateWindowEvent, parent } p
  46. + x <- #{peek XCreateWindowEvent, x } p
  47. + y <- #{peek XCreateWindowEvent, y } p
  48. + width <- #{peek XCreateWindowEvent, width } p
  49. + height <- #{peek XCreateWindowEvent, height } p
  50. + border <- #{peek XCreateWindowEvent, border_width } p
  51. + override <- #{peek XCreateWindowEvent, override_redirect } p
  52. + return $ CreateEvent
  53. + { ev_event_type = type_
  54. + , ev_serial = serial
  55. + , ev_send_event = send_event
  56. + , ev_event_display = display
  57. + , ev_window = window
  58. + , ev_parent = parent
  59. + , ev_x = x
  60. + , ev_y = y
  61. + , ev_width = width
  62. + , ev_height = height
  63. + , ev_border_width = border
  64. + , ev_override_redirect = override
  65. + }
  66. +
  67. +
  68. -- We don't handle this event specifically, so return the generic
  69. -- AnyEvent.
  70. | otherwise -> do
  71. @@ -714,6 +755,7 @@
  72. { wa_x, wa_y, wa_width, wa_height, wa_border_width :: CInt
  73. , wa_map_state :: CInt
  74. , wa_override_redirect :: Bool
  75. + , wa_class :: WindowClass
  76. }
  77.  
  78. --
  79. @@ -736,6 +778,7 @@
  80. `ap` (#{peek XWindowAttributes, border_width } p)
  81. `ap` (#{peek XWindowAttributes, map_state } p)
  82. `ap` (#{peek XWindowAttributes, override_redirect} p)
  83. + `ap` (#{peek XWindowAttributes, class } p)
  84. poke p wa = do
  85. #{poke XWindowAttributes, x } p $ wa_x wa
  86. #{poke XWindowAttributes, y } p $ wa_y wa
  87. @@ -744,6 +787,7 @@
  88. #{poke XWindowAttributes, border_width } p $ wa_border_width wa
  89. #{poke XWindowAttributes, map_state } p $ wa_map_state wa
  90. #{poke XWindowAttributes, override_redirect} p $ wa_override_redirect wa
  91. + #{poke XWindowAttributes, class } p $ wa_class wa
  92.  
  93. foreign import ccall unsafe "XlibExtras.h XGetWindowAttributes"
  94. xGetWindowAttributes :: Display -> Window -> Ptr (WindowAttributes) -> IO Status
  95. diff -rN -u old-X11/Graphics/X11/Xlib/Region.hs new-X11/Graphics/X11/Xlib/Region.hs
  96. --- old-X11/Graphics/X11/Xlib/Region.hs 2011-02-03 20:08:04.708164636 -0600
  97. +++ new-X11/Graphics/X11/Xlib/Region.hs 2011-02-03 20:08:04.714831302 -0600
  98. @@ -15,6 +15,8 @@
  99.  
  100. module Graphics.X11.Xlib.Region(
  101. Region,
  102. + makeRegion,
  103. + withRegion,
  104.  
  105. RectInRegionResult,
  106. rectangleOut,
  107. diff -rN -u old-X11/Graphics/X11/Xlib/Types.hsc new-X11/Graphics/X11/Xlib/Types.hsc
  108. --- old-X11/Graphics/X11/Xlib/Types.hsc 2011-02-03 20:08:04.708164636 -0600
  109. +++ new-X11/Graphics/X11/Xlib/Types.hsc 2011-02-03 20:08:04.714831302 -0600
  110. @@ -15,7 +15,7 @@
  111.  
  112. -- #hide
  113. module Graphics.X11.Xlib.Types(
  114. - Display(..), Screen(..), Visual, GC, GCValues, SetWindowAttributes,
  115. + Display(..), Screen(..), Visual(..), GC, GCValues, SetWindowAttributes,
  116. Image(..), Point(..), Rectangle(..), Arc(..), Segment(..), Color(..),
  117. Pixel, Position, Dimension, Angle, ScreenNumber, Buffer
  118. ) where
Add Comment
Please, Sign In to add comment