{-# LINE 2 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
module Graphics.UI.Gtk.Gdk.DrawWindow (
DrawWindow,
DrawWindowClass,
castToDrawWindow, gTypeDrawWindow,
WindowState(..),
NativeWindowId,
toNativeWindowId,
fromNativeWindowId,
drawWindowGetState,
drawWindowScroll,
drawWindowClear,
drawWindowClearArea,
drawWindowClearAreaExpose,
drawWindowRaise,
drawWindowLower,
drawWindowRegisterDnd,
drawWindowBeginPaintRect,
drawWindowBeginPaintRegion,
drawWindowEndPaint,
drawWindowInvalidateRect,
drawWindowInvalidateRegion,
drawWindowGetUpdateArea,
drawWindowFreezeUpdates,
drawWindowThawUpdates,
drawWindowProcessUpdates,
drawWindowSetAcceptFocus,
drawWindowShapeCombineMask,
drawWindowShapeCombineRegion,
drawWindowSetChildShapes,
drawWindowMergeChildShapes,
drawWindowGetPointer,
drawWindowGetPointerPos,
drawWindowGetOrigin,
drawWindowSetCursor,
drawWindowForeignNew,
drawWindowGetDefaultRootWindow,
drawWindowGetWidth,
drawWindowGetHeight,
) where
import Control.Monad (liftM)
import Data.Maybe (fromMaybe)
import System.Glib.FFI
import System.Glib.Flags (toFlags)
import Graphics.UI.Gtk.Types
{-# LINE 107 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
import Graphics.UI.Gtk.Gdk.Enums
{-# LINE 108 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
import Graphics.UI.Gtk.Gdk.Region
{-# LINE 110 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
import Graphics.UI.Gtk.Gdk.Cursor
{-# LINE 112 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
import Graphics.UI.Gtk.General.Structs
{-# LINE 115 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
drawWindowGetState :: DrawWindowClass self => self
-> IO [WindowState]
drawWindowGetState :: forall self. DrawWindowClass self => self -> IO [WindowState]
drawWindowGetState self
self =
(CInt -> [WindowState]) -> IO CInt -> IO [WindowState]
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> [WindowState]
forall a. Flags a => Int -> [a]
toFlags (Int -> [WindowState]) -> (CInt -> Int) -> CInt -> [WindowState]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO [WindowState]) -> IO CInt -> IO [WindowState]
forall a b. (a -> b) -> a -> b
$
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO CInt) -> IO CInt)
-> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO CInt
gdk_window_get_state Ptr DrawWindow
argPtr1)
{-# LINE 124 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowScroll :: DrawWindowClass self => self
-> Int
-> Int
-> IO ()
drawWindowScroll :: forall self. DrawWindowClass self => self -> Int -> Int -> IO ()
drawWindowScroll self
self Int
dx Int
dy =
(\(DrawWindow ForeignPtr DrawWindow
arg1) CInt
arg2 CInt
arg3 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> CInt -> CInt -> IO ()
gdk_window_scroll Ptr DrawWindow
argPtr1 CInt
arg2 CInt
arg3)
{-# LINE 143 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
dx)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
dy)
drawWindowClear :: DrawWindowClass self => self -> IO ()
drawWindowClear :: forall self. DrawWindowClass self => self -> IO ()
drawWindowClear self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_clear Ptr DrawWindow
argPtr1)
{-# LINE 154 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowClearArea :: DrawWindowClass self => self
-> Int
-> Int
-> Int
-> Int
-> IO ()
drawWindowClearArea :: forall self.
DrawWindowClass self =>
self -> Int -> Int -> Int -> Int -> IO ()
drawWindowClearArea self
self Int
x Int
y Int
width Int
height =
(\(DrawWindow ForeignPtr DrawWindow
arg1) CInt
arg2 CInt
arg3 CInt
arg4 CInt
arg5 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> CInt -> CInt -> CInt -> CInt -> IO ()
gdk_window_clear_area Ptr DrawWindow
argPtr1 CInt
arg2 CInt
arg3 CInt
arg4 CInt
arg5)
{-# LINE 167 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
y)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
drawWindowClearAreaExpose :: DrawWindowClass self => self
-> Int
-> Int
-> Int
-> Int
-> IO ()
drawWindowClearAreaExpose :: forall self.
DrawWindowClass self =>
self -> Int -> Int -> Int -> Int -> IO ()
drawWindowClearAreaExpose self
self Int
x Int
y Int
width Int
height =
(\(DrawWindow ForeignPtr DrawWindow
arg1) CInt
arg2 CInt
arg3 CInt
arg4 CInt
arg5 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> CInt -> CInt -> CInt -> CInt -> IO ()
gdk_window_clear_area_e Ptr DrawWindow
argPtr1 CInt
arg2 CInt
arg3 CInt
arg4 CInt
arg5)
{-# LINE 185 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
x)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
y)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
drawWindowRaise :: DrawWindowClass self => self -> IO ()
drawWindowRaise :: forall self. DrawWindowClass self => self -> IO ()
drawWindowRaise self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_raise Ptr DrawWindow
argPtr1)
{-# LINE 203 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowLower :: DrawWindowClass self => self -> IO ()
drawWindowLower :: forall self. DrawWindowClass self => self -> IO ()
drawWindowLower self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_lower Ptr DrawWindow
argPtr1)
{-# LINE 221 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowRegisterDnd :: DrawWindowClass self => self -> IO ()
drawWindowRegisterDnd :: forall self. DrawWindowClass self => self -> IO ()
drawWindowRegisterDnd self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_register_dnd Ptr DrawWindow
argPtr1)
{-# LINE 228 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowBeginPaintRect :: DrawWindowClass self => self
-> Rectangle
-> IO ()
drawWindowBeginPaintRect :: forall self. DrawWindowClass self => self -> Rectangle -> IO ()
drawWindowBeginPaintRect self
self Rectangle
rectangle = Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Rectangle
rectangle ((Ptr Rectangle -> IO ()) -> IO ())
-> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
rectPtr ->
(\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr ()
arg2 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> Ptr () -> IO ()
gdk_window_begin_paint_rect Ptr DrawWindow
argPtr1 Ptr ()
arg2) (self -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow self
self) (Ptr Rectangle -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr Rectangle
rectPtr)
drawWindowBeginPaintRegion :: DrawWindowClass self => self
-> Region
-> IO ()
drawWindowBeginPaintRegion :: forall self. DrawWindowClass self => self -> Region -> IO ()
drawWindowBeginPaintRegion self
self Region
region =
(\(DrawWindow ForeignPtr DrawWindow
arg1) (Region ForeignPtr Region
arg2) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->ForeignPtr Region -> (Ptr Region -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Region
arg2 ((Ptr Region -> IO ()) -> IO ()) -> (Ptr Region -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Region
argPtr2 ->Ptr DrawWindow -> Ptr Region -> IO ()
gdk_window_begin_paint_region Ptr DrawWindow
argPtr1 Ptr Region
argPtr2)
{-# LINE 285 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
Region
region
drawWindowEndPaint :: DrawWindowClass self => self -> IO ()
drawWindowEndPaint :: forall self. DrawWindowClass self => self -> IO ()
drawWindowEndPaint self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_end_paint Ptr DrawWindow
argPtr1)
{-# LINE 300 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowInvalidateRect :: DrawWindowClass self => self
-> Rectangle
-> Bool
-> IO ()
drawWindowInvalidateRect :: forall self.
DrawWindowClass self =>
self -> Rectangle -> Bool -> IO ()
drawWindowInvalidateRect self
self Rectangle
rect Bool
invalidateChildren =
Rectangle -> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
with Rectangle
rect ((Ptr Rectangle -> IO ()) -> IO ())
-> (Ptr Rectangle -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Rectangle
rectPtr ->
(\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr ()
arg2 CInt
arg3 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> Ptr () -> CInt -> IO ()
gdk_window_invalidate_rect Ptr DrawWindow
argPtr1 Ptr ()
arg2 CInt
arg3)
{-# LINE 313 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Ptr Rectangle -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr Rectangle
rectPtr)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
invalidateChildren)
drawWindowInvalidateRegion :: DrawWindowClass self => self
-> Region
-> Bool
-> IO ()
drawWindowInvalidateRegion :: forall self.
DrawWindowClass self =>
self -> Region -> Bool -> IO ()
drawWindowInvalidateRegion self
self Region
region Bool
invalidateChildren =
(\(DrawWindow ForeignPtr DrawWindow
arg1) (Region ForeignPtr Region
arg2) CInt
arg3 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->ForeignPtr Region -> (Ptr Region -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Region
arg2 ((Ptr Region -> IO ()) -> IO ()) -> (Ptr Region -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Region
argPtr2 ->Ptr DrawWindow -> Ptr Region -> CInt -> IO ()
gdk_window_invalidate_region Ptr DrawWindow
argPtr1 Ptr Region
argPtr2 CInt
arg3)
{-# LINE 335 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
Region
region
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
invalidateChildren)
drawWindowGetUpdateArea :: DrawWindowClass self => self
-> IO (Maybe Region)
drawWindowGetUpdateArea :: forall self. DrawWindowClass self => self -> IO (Maybe Region)
drawWindowGetUpdateArea self
self = do
Ptr Region
reg <- (\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow
-> (Ptr DrawWindow -> IO (Ptr Region)) -> IO (Ptr Region)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO (Ptr Region)) -> IO (Ptr Region))
-> (Ptr DrawWindow -> IO (Ptr Region)) -> IO (Ptr Region)
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO (Ptr Region)
gdk_window_get_update_area Ptr DrawWindow
argPtr1) (self -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow self
self)
if Ptr Region
regPtr Region -> Ptr Region -> Bool
forall a. Eq a => a -> a -> Bool
==Ptr Region
forall a. Ptr a
nullPtr then Maybe Region -> IO (Maybe Region)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Region
forall a. Maybe a
Nothing else (Region -> Maybe Region) -> IO Region -> IO (Maybe Region)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM Region -> Maybe Region
forall a. a -> Maybe a
Just (Ptr Region -> IO Region
makeNewRegion Ptr Region
reg)
drawWindowFreezeUpdates :: DrawWindowClass self => self -> IO ()
drawWindowFreezeUpdates :: forall self. DrawWindowClass self => self -> IO ()
drawWindowFreezeUpdates self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_freeze_updates Ptr DrawWindow
argPtr1)
{-# LINE 366 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowThawUpdates :: DrawWindowClass self => self -> IO ()
drawWindowThawUpdates :: forall self. DrawWindowClass self => self -> IO ()
drawWindowThawUpdates self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_thaw_updates Ptr DrawWindow
argPtr1)
{-# LINE 373 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowProcessUpdates :: DrawWindowClass self => self
-> Bool
-> IO ()
drawWindowProcessUpdates :: forall self. DrawWindowClass self => self -> Bool -> IO ()
drawWindowProcessUpdates self
self Bool
updateChildren =
(\(DrawWindow ForeignPtr DrawWindow
arg1) CInt
arg2 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> CInt -> IO ()
gdk_window_process_updates Ptr DrawWindow
argPtr1 CInt
arg2)
{-# LINE 392 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
updateChildren)
drawWindowSetAcceptFocus :: DrawWindowClass self => self
-> Bool
-> IO ()
drawWindowSetAcceptFocus :: forall self. DrawWindowClass self => self -> Bool -> IO ()
drawWindowSetAcceptFocus self
self Bool
acceptFocus =
(\(DrawWindow ForeignPtr DrawWindow
arg1) CInt
arg2 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> CInt -> IO ()
gdk_window_set_accept_focus Ptr DrawWindow
argPtr1 CInt
arg2)
{-# LINE 409 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
acceptFocus)
drawWindowShapeCombineMask :: DrawWindowClass self => self
-> Maybe Pixmap
-> Int
-> Int
-> IO ()
drawWindowShapeCombineMask :: forall self.
DrawWindowClass self =>
self -> Maybe Pixmap -> Int -> Int -> IO ()
drawWindowShapeCombineMask self
self (Just (Pixmap ForeignPtr Pixmap
mask)) Int
offsetX Int
offsetY =
ForeignPtr Pixmap -> (Ptr Pixmap -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Pixmap
mask ((Ptr Pixmap -> IO ()) -> IO ()) -> (Ptr Pixmap -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Pixmap
maskPtr ->
(\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr ()
arg2 CInt
arg3 CInt
arg4 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> Ptr () -> CInt -> CInt -> IO ()
gdk_window_shape_combine_mask Ptr DrawWindow
argPtr1 Ptr ()
arg2 CInt
arg3 CInt
arg4)
{-# LINE 441 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(Ptr Pixmap -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr Ptr Pixmap
maskPtr)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetX)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetY)
drawWindowShapeCombineMask self
self Maybe Pixmap
Nothing Int
offsetX Int
offsetY =
(\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr ()
arg2 CInt
arg3 CInt
arg4 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> Ptr () -> CInt -> CInt -> IO ()
gdk_window_shape_combine_mask Ptr DrawWindow
argPtr1 Ptr ()
arg2 CInt
arg3 CInt
arg4)
{-# LINE 447 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
Ptr ()
forall a. Ptr a
nullPtr
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetX)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetY)
drawWindowShapeCombineRegion :: DrawWindowClass self => self
-> Maybe Region
-> Int
-> Int
-> IO ()
drawWindowShapeCombineRegion :: forall self.
DrawWindowClass self =>
self -> Maybe Region -> Int -> Int -> IO ()
drawWindowShapeCombineRegion self
self (Just Region
reg) Int
offsetX Int
offsetY =
(\(DrawWindow ForeignPtr DrawWindow
arg1) (Region ForeignPtr Region
arg2) CInt
arg3 CInt
arg4 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->ForeignPtr Region -> (Ptr Region -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Region
arg2 ((Ptr Region -> IO ()) -> IO ()) -> (Ptr Region -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Region
argPtr2 ->Ptr DrawWindow -> Ptr Region -> CInt -> CInt -> IO ()
gdk_window_shape_combine_region Ptr DrawWindow
argPtr1 Ptr Region
argPtr2 CInt
arg3 CInt
arg4)
{-# LINE 479 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
Region
reg
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetX)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetY)
drawWindowShapeCombineRegion self
self Maybe Region
Nothing Int
offsetX Int
offsetY =
(\(DrawWindow ForeignPtr DrawWindow
arg1) (Region ForeignPtr Region
arg2) CInt
arg3 CInt
arg4 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->ForeignPtr Region -> (Ptr Region -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Region
arg2 ((Ptr Region -> IO ()) -> IO ()) -> (Ptr Region -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Region
argPtr2 ->Ptr DrawWindow -> Ptr Region -> CInt -> CInt -> IO ()
gdk_window_shape_combine_region Ptr DrawWindow
argPtr1 Ptr Region
argPtr2 CInt
arg3 CInt
arg4)
{-# LINE 485 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
(ForeignPtr Region -> Region
Region ForeignPtr Region
forall a. ForeignPtr a
nullForeignPtr)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetX)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
offsetY)
drawWindowSetChildShapes :: DrawWindowClass self => self -> IO ()
drawWindowSetChildShapes :: forall self. DrawWindowClass self => self -> IO ()
drawWindowSetChildShapes self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_set_child_shapes Ptr DrawWindow
argPtr1)
{-# LINE 499 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowMergeChildShapes :: DrawWindowClass self => self -> IO ()
drawWindowMergeChildShapes :: forall self. DrawWindowClass self => self -> IO ()
drawWindowMergeChildShapes self
self =
(\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO ()
gdk_window_merge_child_shapes Ptr DrawWindow
argPtr1)
{-# LINE 511 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
drawWindowGetPointer :: DrawWindowClass self => self
-> IO (Maybe (Bool, Int, Int, [Modifier]))
drawWindowGetPointer :: forall self.
DrawWindowClass self =>
self -> IO (Maybe (Bool, Int, Int, [Modifier]))
drawWindowGetPointer self
self =
(Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier])))
-> (Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
xPtr -> (Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier])))
-> (Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
yPtr -> (Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier])))
-> (Ptr CInt -> IO (Maybe (Bool, Int, Int, [Modifier])))
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
mPtr -> do
Ptr DrawWindow
winPtr <- (\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr CInt
arg2 Ptr CInt
arg3 Ptr CInt
arg4 -> ForeignPtr DrawWindow
-> (Ptr DrawWindow -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow))
-> (Ptr DrawWindow -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow
-> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO (Ptr DrawWindow)
gdk_window_get_pointer Ptr DrawWindow
argPtr1 Ptr CInt
arg2 Ptr CInt
arg3 Ptr CInt
arg4) (self -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow self
self)
Ptr CInt
xPtr Ptr CInt
yPtr Ptr CInt
mPtr
if Ptr DrawWindow
winPtrPtr DrawWindow -> Ptr DrawWindow -> Bool
forall a. Eq a => a -> a -> Bool
==Ptr DrawWindow
forall a. Ptr a
nullPtr then Maybe (Bool, Int, Int, [Modifier])
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (Bool, Int, Int, [Modifier])
forall a. Maybe a
Nothing else do
Bool
same <- ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO Bool) -> IO Bool
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (DrawWindow -> ForeignPtr DrawWindow
unDrawWindow (self -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow self
self)) ((Ptr DrawWindow -> IO Bool) -> IO Bool)
-> (Ptr DrawWindow -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
dPtr ->
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr DrawWindow
winPtrPtr DrawWindow -> Ptr DrawWindow -> Bool
forall a. Eq a => a -> a -> Bool
==Ptr DrawWindow
dPtr)
CInt
x <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
xPtr
CInt
y <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
yPtr
CInt
m <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
mPtr
Maybe (Bool, Int, Int, [Modifier])
-> IO (Maybe (Bool, Int, Int, [Modifier]))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ((Bool, Int, Int, [Modifier]) -> Maybe (Bool, Int, Int, [Modifier])
forall a. a -> Maybe a
Just (Bool
same, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
x, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
y,
Int -> [Modifier]
forall a. Flags a => Int -> [a]
toFlags (CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
m)))
drawWindowGetPointerPos :: DrawWindowClass self => self
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
drawWindowGetPointerPos :: forall self.
DrawWindowClass self =>
self -> IO (Maybe DrawWindow, Int, Int, [Modifier])
drawWindowGetPointerPos self
self =
(Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> (Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
xPtr -> (Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> (Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
yPtr -> (Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> (Ptr CInt -> IO (Maybe DrawWindow, Int, Int, [Modifier]))
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
mPtr -> do
Ptr DrawWindow
winPtr <- (\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr CInt
arg2 Ptr CInt
arg3 Ptr CInt
arg4 -> ForeignPtr DrawWindow
-> (Ptr DrawWindow -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow))
-> (Ptr DrawWindow -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow
-> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO (Ptr DrawWindow)
gdk_window_get_pointer Ptr DrawWindow
argPtr1 Ptr CInt
arg2 Ptr CInt
arg3 Ptr CInt
arg4) (self -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow self
self)
Ptr CInt
xPtr Ptr CInt
yPtr Ptr CInt
mPtr
CInt
x <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
xPtr
CInt
y <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
yPtr
CInt
m <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
mPtr
Maybe DrawWindow
mWin <- if Ptr DrawWindow
winPtrPtr DrawWindow -> Ptr DrawWindow -> Bool
forall a. Eq a => a -> a -> Bool
==Ptr DrawWindow
forall a. Ptr a
nullPtr then Maybe DrawWindow -> IO (Maybe DrawWindow)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DrawWindow
forall a. Maybe a
Nothing else (DrawWindow -> Maybe DrawWindow)
-> IO DrawWindow -> IO (Maybe DrawWindow)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM DrawWindow -> Maybe DrawWindow
forall a. a -> Maybe a
Just (IO DrawWindow -> IO (Maybe DrawWindow))
-> IO DrawWindow -> IO (Maybe DrawWindow)
forall a b. (a -> b) -> a -> b
$
(ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr DrawWindow)
-> IO (Ptr DrawWindow) -> IO DrawWindow
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr DrawWindow)
forall {a}. (ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr a)
mkDrawWindow (Ptr DrawWindow -> IO (Ptr DrawWindow)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DrawWindow
winPtr)
(Maybe DrawWindow, Int, Int, [Modifier])
-> IO (Maybe DrawWindow, Int, Int, [Modifier])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe DrawWindow
mWin, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
x, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
y, Int -> [Modifier]
forall a. Flags a => Int -> [a]
toFlags (CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
m))
drawWindowGetOrigin :: DrawWindow
-> IO (Int, Int)
drawWindowGetOrigin :: DrawWindow -> IO (Int, Int)
drawWindowGetOrigin DrawWindow
self =
(Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Int, Int)) -> IO (Int, Int))
-> (Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
xPtr ->
(Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Int, Int)) -> IO (Int, Int))
-> (Ptr CInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
yPtr -> do
(\(DrawWindow ForeignPtr DrawWindow
arg1) Ptr CInt
arg2 Ptr CInt
arg3 -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO CInt) -> IO CInt)
-> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> Ptr CInt -> Ptr CInt -> IO CInt
gdk_window_get_origin Ptr DrawWindow
argPtr1 Ptr CInt
arg2 Ptr CInt
arg3)
{-# LINE 578 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
(toDrawWindow self)
Ptr CInt
xPtr
Ptr CInt
yPtr
CInt
x <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
xPtr
CInt
y <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
yPtr
(Int, Int) -> IO (Int, Int)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
x, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
y)
drawWindowSetCursor :: DrawWindow -> Maybe Cursor -> IO ()
drawWindowSetCursor :: DrawWindow -> Maybe Cursor -> IO ()
drawWindowSetCursor DrawWindow
self Maybe Cursor
cursor =
(\(DrawWindow ForeignPtr DrawWindow
arg1) (Cursor ForeignPtr Cursor
arg2) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->ForeignPtr Cursor -> (Ptr Cursor -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cursor
arg2 ((Ptr Cursor -> IO ()) -> IO ()) -> (Ptr Cursor -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cursor
argPtr2 ->Ptr DrawWindow -> Ptr Cursor -> IO ()
gdk_window_set_cursor Ptr DrawWindow
argPtr1 Ptr Cursor
argPtr2)
{-# LINE 595 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
self
(Cursor -> Maybe Cursor -> Cursor
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cursor -> Cursor
Cursor ForeignPtr Cursor
forall a. ForeignPtr a
nullForeignPtr) Maybe Cursor
cursor)
drawWindowForeignNew :: NativeWindowId -> IO (Maybe DrawWindow)
drawWindowForeignNew :: NativeWindowId -> IO (Maybe DrawWindow)
drawWindowForeignNew NativeWindowId
anid = (IO (Ptr DrawWindow) -> IO DrawWindow)
-> IO (Ptr DrawWindow) -> IO (Maybe DrawWindow)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr DrawWindow)
-> IO (Ptr DrawWindow) -> IO DrawWindow
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr DrawWindow)
forall {a}. (ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr a)
mkDrawWindow) (IO (Ptr DrawWindow) -> IO (Maybe DrawWindow))
-> IO (Ptr DrawWindow) -> IO (Maybe DrawWindow)
forall a b. (a -> b) -> a -> b
$
(Ptr DrawWindow -> Ptr DrawWindow)
-> IO (Ptr DrawWindow) -> IO (Ptr DrawWindow)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM Ptr DrawWindow -> Ptr DrawWindow
forall a b. Ptr a -> Ptr b
castPtr (IO (Ptr DrawWindow) -> IO (Ptr DrawWindow))
-> IO (Ptr DrawWindow) -> IO (Ptr DrawWindow)
forall a b. (a -> b) -> a -> b
$ CUInt -> IO (Ptr DrawWindow)
gdk_window_foreign_new (NativeWindowId -> CUInt
forall a. Integral a => NativeWindowId -> a
fromNativeWindowId NativeWindowId
anid)
drawWindowGetDefaultRootWindow ::
IO DrawWindow
drawWindowGetDefaultRootWindow :: IO DrawWindow
drawWindowGetDefaultRootWindow =
(ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr DrawWindow)
-> IO (Ptr DrawWindow) -> IO DrawWindow
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr DrawWindow)
forall {a}. (ForeignPtr DrawWindow -> DrawWindow, FinalizerPtr a)
mkDrawWindow (IO (Ptr DrawWindow) -> IO DrawWindow)
-> IO (Ptr DrawWindow) -> IO DrawWindow
forall a b. (a -> b) -> a -> b
$
IO (Ptr DrawWindow)
gdk_get_default_root_window
{-# LINE 615 "./Graphics/UI/Gtk/Gdk/DrawWindow.chs" #-}
drawWindowGetWidth :: DrawWindow -> IO Int
drawWindowGetWidth :: DrawWindow -> IO Int
drawWindowGetWidth DrawWindow
self =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$ (\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO CInt) -> IO CInt)
-> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO CInt
gdk_window_get_width Ptr DrawWindow
argPtr1) (DrawWindow -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow DrawWindow
self)
drawWindowGetHeight :: DrawWindow -> IO Int
drawWindowGetHeight :: DrawWindow -> IO Int
drawWindowGetHeight DrawWindow
self =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$ (\(DrawWindow ForeignPtr DrawWindow
arg1) -> ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg1 ((Ptr DrawWindow -> IO CInt) -> IO CInt)
-> (Ptr DrawWindow -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr1 ->Ptr DrawWindow -> IO CInt
gdk_window_get_height Ptr DrawWindow
argPtr1) (DrawWindow -> DrawWindow
forall o. DrawWindowClass o => o -> DrawWindow
toDrawWindow DrawWindow
self)
foreign import ccall safe "gdk_window_get_state"
gdk_window_get_state :: ((Ptr DrawWindow) -> (IO CInt))
foreign import ccall safe "gdk_window_scroll"
gdk_window_scroll :: ((Ptr DrawWindow) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "gdk_window_clear"
gdk_window_clear :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_clear_area"
gdk_window_clear_area :: ((Ptr DrawWindow) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))
foreign import ccall safe "gdk_window_clear_area_e"
gdk_window_clear_area_e :: ((Ptr DrawWindow) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ()))))))
foreign import ccall safe "gdk_window_raise"
gdk_window_raise :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_lower"
gdk_window_lower :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_register_dnd"
gdk_window_register_dnd :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_begin_paint_rect"
gdk_window_begin_paint_rect :: ((Ptr DrawWindow) -> ((Ptr ()) -> (IO ())))
foreign import ccall safe "gdk_window_begin_paint_region"
gdk_window_begin_paint_region :: ((Ptr DrawWindow) -> ((Ptr Region) -> (IO ())))
foreign import ccall safe "gdk_window_end_paint"
gdk_window_end_paint :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_invalidate_rect"
gdk_window_invalidate_rect :: ((Ptr DrawWindow) -> ((Ptr ()) -> (CInt -> (IO ()))))
foreign import ccall safe "gdk_window_invalidate_region"
gdk_window_invalidate_region :: ((Ptr DrawWindow) -> ((Ptr Region) -> (CInt -> (IO ()))))
foreign import ccall safe "gdk_window_get_update_area"
gdk_window_get_update_area :: ((Ptr DrawWindow) -> (IO (Ptr Region)))
foreign import ccall safe "gdk_window_freeze_updates"
gdk_window_freeze_updates :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_thaw_updates"
gdk_window_thaw_updates :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_process_updates"
gdk_window_process_updates :: ((Ptr DrawWindow) -> (CInt -> (IO ())))
foreign import ccall safe "gdk_window_set_accept_focus"
gdk_window_set_accept_focus :: ((Ptr DrawWindow) -> (CInt -> (IO ())))
foreign import ccall safe "gdk_window_shape_combine_mask"
gdk_window_shape_combine_mask :: ((Ptr DrawWindow) -> ((Ptr ()) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gdk_window_shape_combine_region"
gdk_window_shape_combine_region :: ((Ptr DrawWindow) -> ((Ptr Region) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gdk_window_set_child_shapes"
gdk_window_set_child_shapes :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_merge_child_shapes"
gdk_window_merge_child_shapes :: ((Ptr DrawWindow) -> (IO ()))
foreign import ccall safe "gdk_window_get_pointer"
gdk_window_get_pointer :: ((Ptr DrawWindow) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO (Ptr DrawWindow))))))
foreign import ccall safe "gdk_window_get_origin"
gdk_window_get_origin :: ((Ptr DrawWindow) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO CInt))))
foreign import ccall safe "gdk_window_set_cursor"
gdk_window_set_cursor :: ((Ptr DrawWindow) -> ((Ptr Cursor) -> (IO ())))
foreign import ccall safe "gdk_window_foreign_new"
gdk_window_foreign_new :: (CUInt -> (IO (Ptr DrawWindow)))
foreign import ccall safe "gdk_get_default_root_window"
gdk_get_default_root_window :: (IO (Ptr DrawWindow))
foreign import ccall safe "gdk_window_get_width"
gdk_window_get_width :: ((Ptr DrawWindow) -> (IO CInt))
foreign import ccall safe "gdk_window_get_height"
gdk_window_get_height :: ((Ptr DrawWindow) -> (IO CInt))