{-# LINE 2 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
module Graphics.UI.Gtk.Gdk.Display (
Display,
DisplayClass,
castToDisplay, gTypeDisplay,
toDisplay,
displayOpen,
displayGetDefault,
displayGetName,
displayGetNScreens,
displayGetScreen,
displayGetDefaultScreen,
displayPointerUngrab,
displayKeyboardUngrab,
displayPointerIsGrabbed,
displayBeep,
displaySync,
displayFlush,
displayClose,
displayListDevices,
displaySetDoubleClickTime,
displaySetDoubleClickDistance,
displayGetPointer,
displayGetWindowAtPointer,
displayWarpPointer,
displaySupportsCursorColor,
displaySupportsCursorAlpha,
displayGetDefaultCursorSize,
displayGetMaximalCursorSize,
displayGetDefaultGroup,
displaySupportsSelectionNotification,
displayRequestSelectionNotification,
displaySupportsClipboardPersistence,
displayStoreClipboard,
displaySupportsShapes,
displaySupportsInputShapes,
displaySupportsComposite,
displayClosed,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Flags
import System.Glib.GList
import Graphics.UI.Gtk.Types
{-# LINE 122 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
import Graphics.UI.Gtk.Signals
import Graphics.UI.Gtk.Gdk.EventM
import Graphics.UI.Gtk.General.DNDTypes (SelectionTag, TargetTag, Atom(..))
{-# LINE 127 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
displayOpen :: GlibString string
=> string
-> IO (Maybe Display)
displayOpen :: forall string. GlibString string => string -> IO (Maybe Display)
displayOpen string
displayName =
(IO (Ptr Display) -> IO Display)
-> IO (Ptr Display) -> IO (Maybe Display)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Display -> Display, FinalizerPtr Display)
-> IO (Ptr Display) -> IO Display
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr Display -> Display, FinalizerPtr Display)
forall {a}. (ForeignPtr Display -> Display, FinalizerPtr a)
mkDisplay) (IO (Ptr Display) -> IO (Maybe Display))
-> IO (Ptr Display) -> IO (Maybe Display)
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr Display)) -> IO (Ptr Display)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
displayName ((CString -> IO (Ptr Display)) -> IO (Ptr Display))
-> (CString -> IO (Ptr Display)) -> IO (Ptr Display)
forall a b. (a -> b) -> a -> b
$ \CString
displayNamePtr ->
CString -> IO (Ptr Display)
gdk_display_open
{-# LINE 143 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
displayNamePtr
displayGetDefault ::
IO (Maybe Display)
displayGetDefault :: IO (Maybe Display)
displayGetDefault =
(IO (Ptr Display) -> IO Display)
-> IO (Ptr Display) -> IO (Maybe Display)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Display -> Display, FinalizerPtr Display)
-> IO (Ptr Display) -> IO Display
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr Display -> Display, FinalizerPtr Display)
forall {a}. (ForeignPtr Display -> Display, FinalizerPtr a)
mkDisplay) (IO (Ptr Display) -> IO (Maybe Display))
-> IO (Ptr Display) -> IO (Maybe Display)
forall a b. (a -> b) -> a -> b
$
IO (Ptr Display)
gdk_display_get_default
{-# LINE 155 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
displayGetName :: GlibString string => Display
-> IO string
displayGetName :: forall string. GlibString string => Display -> IO string
displayGetName Display
self =
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CString) -> IO CString)
-> (Ptr Display -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CString
gdk_display_get_name Ptr Display
argPtr1)
{-# LINE 162 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
IO CString -> (CString -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= CString -> IO string
forall s. GlibString s => CString -> IO s
peekUTFString
displayGetNScreens :: Display
-> IO Int
displayGetNScreens :: Display -> IO Int
displayGetNScreens Display
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
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_get_n_screens Ptr Display
argPtr1)
{-# LINE 172 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayGetScreen :: Display
-> Int
-> IO Screen
displayGetScreen :: Display -> Int -> IO Screen
displayGetScreen Display
self Int
screenNum =
(ForeignPtr Screen -> Screen, FinalizerPtr Screen)
-> IO (Ptr Screen) -> IO Screen
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr Screen -> Screen, FinalizerPtr Screen)
forall {a}. (ForeignPtr Screen -> Screen, FinalizerPtr a)
mkScreen (IO (Ptr Screen) -> IO Screen) -> IO (Ptr Screen) -> IO Screen
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) CInt
arg2 -> ForeignPtr Display
-> (Ptr Display -> IO (Ptr Screen)) -> IO (Ptr Screen)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO (Ptr Screen)) -> IO (Ptr Screen))
-> (Ptr Display -> IO (Ptr Screen)) -> IO (Ptr Screen)
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> CInt -> IO (Ptr Screen)
gdk_display_get_screen Ptr Display
argPtr1 CInt
arg2)
{-# LINE 182 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
screenNum)
displayGetDefaultScreen :: Display
-> IO Screen
displayGetDefaultScreen :: Display -> IO Screen
displayGetDefaultScreen Display
self =
(ForeignPtr Screen -> Screen, FinalizerPtr Screen)
-> IO (Ptr Screen) -> IO Screen
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr Screen -> Screen, FinalizerPtr Screen)
forall {a}. (ForeignPtr Screen -> Screen, FinalizerPtr a)
mkScreen (IO (Ptr Screen) -> IO Screen) -> IO (Ptr Screen) -> IO Screen
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display
-> (Ptr Display -> IO (Ptr Screen)) -> IO (Ptr Screen)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO (Ptr Screen)) -> IO (Ptr Screen))
-> (Ptr Display -> IO (Ptr Screen)) -> IO (Ptr Screen)
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO (Ptr Screen)
gdk_display_get_default_screen Ptr Display
argPtr1)
{-# LINE 192 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayPointerUngrab :: Display
-> TimeStamp
-> IO ()
displayPointerUngrab :: Display -> Word32 -> IO ()
displayPointerUngrab Display
self Word32
time =
(\(Display ForeignPtr Display
arg1) CUInt
arg2 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> CUInt -> IO ()
gdk_display_pointer_ungrab Ptr Display
argPtr1 CUInt
arg2)
{-# LINE 201 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
(Word32 -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
time)
displayKeyboardUngrab :: Display
-> TimeStamp
-> IO ()
displayKeyboardUngrab :: Display -> Word32 -> IO ()
displayKeyboardUngrab Display
self Word32
time =
(\(Display ForeignPtr Display
arg1) CUInt
arg2 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> CUInt -> IO ()
gdk_display_keyboard_ungrab Ptr Display
argPtr1 CUInt
arg2)
{-# LINE 211 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
(Word32 -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
time)
displayPointerIsGrabbed :: Display
-> IO Bool
displayPointerIsGrabbed :: Display -> IO Bool
displayPointerIsGrabbed Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_pointer_is_grabbed Ptr Display
argPtr1)
{-# LINE 221 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayBeep :: Display -> IO ()
displayBeep :: Display -> IO ()
displayBeep Display
self =
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO ()
gdk_display_beep Ptr Display
argPtr1)
{-# LINE 228 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displaySync :: Display -> IO ()
displaySync :: Display -> IO ()
displaySync Display
self =
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO ()
gdk_display_sync Ptr Display
argPtr1)
{-# LINE 242 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayFlush :: Display -> IO ()
displayFlush :: Display -> IO ()
displayFlush Display
self =
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO ()
gdk_display_flush Ptr Display
argPtr1)
{-# LINE 260 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayClose :: Display -> IO ()
displayClose :: Display -> IO ()
displayClose Display
self =
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO ()
gdk_display_close Ptr Display
argPtr1)
{-# LINE 269 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayListDevices :: Display
-> IO [Device]
displayListDevices :: Display -> IO [Device]
displayListDevices Display
self =
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr Display -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO (Ptr ())
gdk_display_list_devices Ptr Display
argPtr1)
{-# LINE 277 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
IO (Ptr ()) -> (Ptr () -> IO [Ptr Device]) -> IO [Ptr Device]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr () -> IO [Ptr Device]
forall a. Ptr () -> IO [Ptr a]
readGList
IO [Ptr Device] -> ([Ptr Device] -> IO [Device]) -> IO [Device]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Ptr Device -> IO Device) -> [Ptr Device] -> IO [Device]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ForeignPtr Device -> Device, FinalizerPtr Device)
-> IO (Ptr Device) -> IO Device
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr Device -> Device, FinalizerPtr Device)
forall {a}. (ForeignPtr Device -> Device, FinalizerPtr a)
mkDevice (IO (Ptr Device) -> IO Device)
-> (Ptr Device -> IO (Ptr Device)) -> Ptr Device -> IO Device
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Ptr Device -> IO (Ptr Device)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return)
displaySetDoubleClickTime :: Display
-> Int
-> IO ()
displaySetDoubleClickTime :: Display -> Int -> IO ()
displaySetDoubleClickTime Display
self Int
msec =
(\(Display ForeignPtr Display
arg1) CUInt
arg2 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> CUInt -> IO ()
gdk_display_set_double_click_time Ptr Display
argPtr1 CUInt
arg2)
{-# LINE 293 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
msec)
displaySetDoubleClickDistance :: Display
-> Int
-> IO ()
displaySetDoubleClickDistance :: Display -> Int -> IO ()
displaySetDoubleClickDistance Display
self Int
distance =
(\(Display ForeignPtr Display
arg1) CUInt
arg2 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> CUInt -> IO ()
gdk_display_set_double_click_distance Ptr Display
argPtr1 CUInt
arg2)
{-# LINE 309 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
distance)
displayGetPointer :: Display
-> IO (Screen, [Modifier], Int, Int)
displayGetPointer :: Display -> IO (Screen, [Modifier], Int, Int)
displayGetPointer Display
self =
(Ptr (Ptr Screen) -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr (Ptr Screen) -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int))
-> (Ptr (Ptr Screen) -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr Screen)
sPtr ->
(Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int))
-> (Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
xPtr ->
(Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int))
-> (Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
yPtr ->
(Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int))
-> (Ptr CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
mPtr ->
(\(Display ForeignPtr Display
arg1) Ptr Screen
arg2 Ptr CInt
arg3 Ptr CInt
arg4 Ptr CInt
arg5 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display
-> Ptr Screen -> Ptr CInt -> Ptr CInt -> Ptr CInt -> IO ()
gdk_display_get_pointer Ptr Display
argPtr1 Ptr Screen
arg2 Ptr CInt
arg3 Ptr CInt
arg4 Ptr CInt
arg5)
{-# LINE 326 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
(Ptr (Ptr Screen) -> Ptr Screen
forall a b. Ptr a -> Ptr b
castPtr Ptr (Ptr Screen)
sPtr)
Ptr CInt
xPtr
Ptr CInt
yPtr
Ptr CInt
mPtr IO () -> IO Screen -> IO Screen
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
(ForeignPtr Screen -> Screen, FinalizerPtr Screen)
-> IO (Ptr Screen) -> IO Screen
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr Screen -> Screen, FinalizerPtr Screen)
forall {a}. (ForeignPtr Screen -> Screen, FinalizerPtr a)
mkScreen (Ptr (Ptr Screen) -> IO (Ptr Screen)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Screen)
sPtr) IO Screen
-> (Screen -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \Screen
s ->
Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
xPtr IO CInt
-> (CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
x ->
Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
yPtr IO CInt
-> (CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
y ->
Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
mPtr IO CInt
-> (CInt -> IO (Screen, [Modifier], Int, Int))
-> IO (Screen, [Modifier], Int, Int)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
m ->
(Screen, [Modifier], Int, Int) -> IO (Screen, [Modifier], Int, Int)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Screen
s, Int -> [Modifier]
forall a. Flags a => Int -> [a]
toFlags (CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
m), 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)
displayGetWindowAtPointer :: Display
-> IO (Maybe (DrawWindow, Int, Int))
displayGetWindowAtPointer :: Display -> IO (Maybe (DrawWindow, Int, Int))
displayGetWindowAtPointer Display
self =
(Ptr CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int)))
-> (Ptr CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
winXPtr ->
(Ptr CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int)))
-> (Ptr CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. (a -> b) -> a -> b
$ \Ptr CInt
winYPtr -> do
Ptr DrawWindow
wPtr <- (\(Display ForeignPtr Display
arg1) Ptr CInt
arg2 Ptr CInt
arg3 -> ForeignPtr Display
-> (Ptr Display -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow))
-> (Ptr Display -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> Ptr CInt -> Ptr CInt -> IO (Ptr DrawWindow)
gdk_display_get_window_at_pointer Ptr Display
argPtr1 Ptr CInt
arg2 Ptr CInt
arg3)
{-# LINE 352 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
Ptr CInt
winXPtr
Ptr CInt
winYPtr
if Ptr DrawWindow
wPtrPtr DrawWindow -> Ptr DrawWindow -> Bool
forall a. Eq a => a -> a -> Bool
==Ptr DrawWindow
forall a. Ptr a
nullPtr then Maybe (DrawWindow, Int, Int) -> IO (Maybe (DrawWindow, Int, Int))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe (DrawWindow, Int, Int)
forall a. Maybe a
Nothing else
Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
winXPtr IO CInt
-> (CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
winX ->
Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
winYPtr IO CInt
-> (CInt -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CInt
winY ->
(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
wPtr) IO DrawWindow
-> (DrawWindow -> IO (Maybe (DrawWindow, Int, Int)))
-> IO (Maybe (DrawWindow, Int, Int))
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \DrawWindow
win ->
Maybe (DrawWindow, Int, Int) -> IO (Maybe (DrawWindow, Int, Int))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ((DrawWindow, Int, Int) -> Maybe (DrawWindow, Int, Int)
forall a. a -> Maybe a
Just (DrawWindow
win, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
winX, CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
winY))
displayWarpPointer :: Display
-> Screen
-> Int
-> Int
-> IO ()
displayWarpPointer :: Display -> Screen -> Int -> Int -> IO ()
displayWarpPointer Display
self Screen
screen Int
x Int
y =
(\(Display ForeignPtr Display
arg1) (Screen ForeignPtr Screen
arg2) CInt
arg3 CInt
arg4 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->ForeignPtr Screen -> (Ptr Screen -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Screen
arg2 ((Ptr Screen -> IO ()) -> IO ()) -> (Ptr Screen -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Screen
argPtr2 ->Ptr Display -> Ptr Screen -> CInt -> CInt -> IO ()
gdk_display_warp_pointer Ptr Display
argPtr1 Ptr Screen
argPtr2 CInt
arg3 CInt
arg4)
{-# LINE 404 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
Screen
screen
(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)
displaySupportsCursorColor :: Display
-> IO Bool
displaySupportsCursorColor :: Display -> IO Bool
displaySupportsCursorColor Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_cursor_color Ptr Display
argPtr1)
{-# LINE 421 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displaySupportsCursorAlpha :: Display
-> IO Bool
displaySupportsCursorAlpha :: Display -> IO Bool
displaySupportsCursorAlpha Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_cursor_alpha Ptr Display
argPtr1)
{-# LINE 433 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayGetDefaultCursorSize :: Display
-> IO Int
displayGetDefaultCursorSize :: Display -> IO Int
displayGetDefaultCursorSize Display
self =
(CUInt -> Int) -> IO CUInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CUInt -> IO Int) -> IO CUInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CUInt) -> IO CUInt)
-> (Ptr Display -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CUInt
gdk_display_get_default_cursor_size Ptr Display
argPtr1)
{-# LINE 444 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayGetMaximalCursorSize :: Display
-> IO (Int, Int)
displayGetMaximalCursorSize :: Display -> IO (Int, Int)
displayGetMaximalCursorSize Display
self =
(Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int))
-> (Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CUInt
widthPtr ->
(Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int))
-> (Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. (a -> b) -> a -> b
$ \Ptr CUInt
heightPtr ->
(\(Display ForeignPtr Display
arg1) Ptr CUInt
arg2 Ptr CUInt
arg3 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> Ptr CUInt -> Ptr CUInt -> IO ()
gdk_display_get_maximal_cursor_size Ptr Display
argPtr1 Ptr CUInt
arg2 Ptr CUInt
arg3)
{-# LINE 457 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
Ptr CUInt
widthPtr
Ptr CUInt
heightPtr IO () -> IO CUInt -> IO CUInt
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>>
Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
widthPtr IO CUInt -> (CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CUInt
width ->
Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
heightPtr IO CUInt -> (CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CUInt
height ->
(Int, Int) -> IO (Int, Int)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CUInt
width, CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CUInt
height)
displayGetDefaultGroup :: Display
-> IO DrawWindow
displayGetDefaultGroup :: Display -> IO DrawWindow
displayGetDefaultGroup Display
self =
(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
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display
-> (Ptr Display -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow))
-> (Ptr Display -> IO (Ptr DrawWindow)) -> IO (Ptr DrawWindow)
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO (Ptr DrawWindow)
gdk_display_get_default_group Ptr Display
argPtr1)
{-# LINE 474 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displaySupportsSelectionNotification :: Display
-> IO Bool
displaySupportsSelectionNotification :: Display -> IO Bool
displaySupportsSelectionNotification Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_selection_notification Ptr Display
argPtr1)
{-# LINE 488 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayRequestSelectionNotification :: Display
-> SelectionTag
-> IO Bool
displayRequestSelectionNotification :: Display -> SelectionTag -> IO Bool
displayRequestSelectionNotification Display
self (Atom Ptr ()
selection) =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) Ptr ()
arg2 -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> Ptr () -> IO CInt
gdk_display_request_selection_notification Ptr Display
argPtr1 Ptr ()
arg2)
{-# LINE 504 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
Ptr ()
selection
displaySupportsClipboardPersistence :: Display
-> IO Bool
displaySupportsClipboardPersistence :: Display -> IO Bool
displaySupportsClipboardPersistence Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_clipboard_persistence Ptr Display
argPtr1)
{-# LINE 518 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayStoreClipboard :: Display
-> DrawWindow
-> Word32
-> (Maybe [TargetTag])
-> IO ()
displayStoreClipboard :: Display -> DrawWindow -> Word32 -> Maybe [SelectionTag] -> IO ()
displayStoreClipboard Display
self DrawWindow
clipboardWindow Word32
time (Just [SelectionTag]
targets) =
[Ptr ()] -> (Int -> Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. Storable a => [a] -> (Int -> Ptr a -> IO b) -> IO b
withArrayLen ((SelectionTag -> Ptr ()) -> [SelectionTag] -> [Ptr ()]
forall a b. (a -> b) -> [a] -> [b]
map (\(Atom Ptr ()
a) -> Ptr ()
a) [SelectionTag]
targets) ((Int -> Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Int -> Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Int
nTargets Ptr (Ptr ())
tPtr ->
(\(Display ForeignPtr Display
arg1) (DrawWindow ForeignPtr DrawWindow
arg2) CUInt
arg3 Ptr (Ptr ())
arg4 CInt
arg5 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg2 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr2 ->Ptr Display
-> Ptr DrawWindow -> CUInt -> Ptr (Ptr ()) -> CInt -> IO ()
gdk_display_store_clipboard Ptr Display
argPtr1 Ptr DrawWindow
argPtr2 CUInt
arg3 Ptr (Ptr ())
arg4 CInt
arg5)
{-# LINE 538 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
DrawWindow
clipboardWindow
(Word32 -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
time)
Ptr (Ptr ())
tPtr
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
nTargets)
displayStoreClipboard Display
self DrawWindow
clipboardWindow Word32
time Maybe [SelectionTag]
Nothing =
(\(Display ForeignPtr Display
arg1) (DrawWindow ForeignPtr DrawWindow
arg2) CUInt
arg3 Ptr (Ptr ())
arg4 CInt
arg5 -> ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->ForeignPtr DrawWindow -> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr DrawWindow
arg2 ((Ptr DrawWindow -> IO ()) -> IO ())
-> (Ptr DrawWindow -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr DrawWindow
argPtr2 ->Ptr Display
-> Ptr DrawWindow -> CUInt -> Ptr (Ptr ()) -> CInt -> IO ()
gdk_display_store_clipboard Ptr Display
argPtr1 Ptr DrawWindow
argPtr2 CUInt
arg3 Ptr (Ptr ())
arg4 CInt
arg5)
{-# LINE 545 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
DrawWindow
clipboardWindow
(Word32 -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
time)
Ptr (Ptr ())
forall a. Ptr a
nullPtr
CInt
0
displaySupportsShapes :: Display
-> IO Bool
displaySupportsShapes :: Display -> IO Bool
displaySupportsShapes Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_shapes Ptr Display
argPtr1)
{-# LINE 562 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displaySupportsInputShapes :: Display
-> IO Bool
displaySupportsInputShapes :: Display -> IO Bool
displaySupportsInputShapes Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_input_shapes Ptr Display
argPtr1)
{-# LINE 575 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displaySupportsComposite :: Display
-> IO Bool
displaySupportsComposite :: Display -> IO Bool
displaySupportsComposite Display
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Display ForeignPtr Display
arg1) -> ForeignPtr Display -> (Ptr Display -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg1 ((Ptr Display -> IO CInt) -> IO CInt)
-> (Ptr Display -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr1 ->Ptr Display -> IO CInt
gdk_display_supports_composite Ptr Display
argPtr1)
{-# LINE 591 "./Graphics/UI/Gtk/Gdk/Display.chs" #-}
self
displayClosed :: DisplayClass self => Signal self (Bool -> IO ())
displayClosed :: forall self. DisplayClass self => Signal self (Bool -> IO ())
displayClosed = (Bool -> self -> (Bool -> IO ()) -> IO (ConnectId self))
-> Signal self (Bool -> IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (SignalName
-> Bool -> self -> (Bool -> IO ()) -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
SignalName -> Bool -> obj -> (Bool -> IO ()) -> IO (ConnectId obj)
connect_BOOL__NONE SignalName
"closed")
foreign import ccall safe "gdk_display_open"
gdk_display_open :: ((Ptr CChar) -> (IO (Ptr Display)))
foreign import ccall safe "gdk_display_get_default"
gdk_display_get_default :: (IO (Ptr Display))
foreign import ccall safe "gdk_display_get_name"
gdk_display_get_name :: ((Ptr Display) -> (IO (Ptr CChar)))
foreign import ccall safe "gdk_display_get_n_screens"
gdk_display_get_n_screens :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_get_screen"
gdk_display_get_screen :: ((Ptr Display) -> (CInt -> (IO (Ptr Screen))))
foreign import ccall safe "gdk_display_get_default_screen"
gdk_display_get_default_screen :: ((Ptr Display) -> (IO (Ptr Screen)))
foreign import ccall safe "gdk_display_pointer_ungrab"
gdk_display_pointer_ungrab :: ((Ptr Display) -> (CUInt -> (IO ())))
foreign import ccall safe "gdk_display_keyboard_ungrab"
gdk_display_keyboard_ungrab :: ((Ptr Display) -> (CUInt -> (IO ())))
foreign import ccall safe "gdk_display_pointer_is_grabbed"
gdk_display_pointer_is_grabbed :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_beep"
gdk_display_beep :: ((Ptr Display) -> (IO ()))
foreign import ccall safe "gdk_display_sync"
gdk_display_sync :: ((Ptr Display) -> (IO ()))
foreign import ccall safe "gdk_display_flush"
gdk_display_flush :: ((Ptr Display) -> (IO ()))
foreign import ccall safe "gdk_display_close"
gdk_display_close :: ((Ptr Display) -> (IO ()))
foreign import ccall safe "gdk_display_list_devices"
gdk_display_list_devices :: ((Ptr Display) -> (IO (Ptr ())))
foreign import ccall safe "gdk_display_set_double_click_time"
gdk_display_set_double_click_time :: ((Ptr Display) -> (CUInt -> (IO ())))
foreign import ccall safe "gdk_display_set_double_click_distance"
gdk_display_set_double_click_distance :: ((Ptr Display) -> (CUInt -> (IO ())))
foreign import ccall safe "gdk_display_get_pointer"
gdk_display_get_pointer :: ((Ptr Display) -> ((Ptr Screen) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ()))))))
foreign import ccall safe "gdk_display_get_window_at_pointer"
gdk_display_get_window_at_pointer :: ((Ptr Display) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO (Ptr DrawWindow)))))
foreign import ccall safe "gdk_display_warp_pointer"
gdk_display_warp_pointer :: ((Ptr Display) -> ((Ptr Screen) -> (CInt -> (CInt -> (IO ())))))
foreign import ccall safe "gdk_display_supports_cursor_color"
gdk_display_supports_cursor_color :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_supports_cursor_alpha"
gdk_display_supports_cursor_alpha :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_get_default_cursor_size"
gdk_display_get_default_cursor_size :: ((Ptr Display) -> (IO CUInt))
foreign import ccall safe "gdk_display_get_maximal_cursor_size"
gdk_display_get_maximal_cursor_size :: ((Ptr Display) -> ((Ptr CUInt) -> ((Ptr CUInt) -> (IO ()))))
foreign import ccall safe "gdk_display_get_default_group"
gdk_display_get_default_group :: ((Ptr Display) -> (IO (Ptr DrawWindow)))
foreign import ccall safe "gdk_display_supports_selection_notification"
gdk_display_supports_selection_notification :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_request_selection_notification"
gdk_display_request_selection_notification :: ((Ptr Display) -> ((Ptr ()) -> (IO CInt)))
foreign import ccall safe "gdk_display_supports_clipboard_persistence"
gdk_display_supports_clipboard_persistence :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_store_clipboard"
gdk_display_store_clipboard :: ((Ptr Display) -> ((Ptr DrawWindow) -> (CUInt -> ((Ptr (Ptr ())) -> (CInt -> (IO ()))))))
foreign import ccall safe "gdk_display_supports_shapes"
gdk_display_supports_shapes :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_supports_input_shapes"
gdk_display_supports_input_shapes :: ((Ptr Display) -> (IO CInt))
foreign import ccall safe "gdk_display_supports_composite"
gdk_display_supports_composite :: ((Ptr Display) -> (IO CInt))