{-# LINE 2 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
module Graphics.UI.Gtk.Gdk.AppLaunchContext (
AppLaunchContext,
AppLaunchContextClass,
castToAppLaunchContext,
gTypeAppLaunchContext,
toAppLaunchContext,
appLaunchContextNew,
appLaunchContextSetDisplay,
appLaunchContextSetScreen,
appLaunchContextSetDesktop,
appLaunchContextSetTimestamp,
appLaunchContextSetIconName,
appLaunchContextSetIcon,
) where
import System.Glib.FFI
import System.Glib.UTFString
import Graphics.UI.Gtk.Gdk.EventM (TimeStamp)
import Graphics.UI.Gtk.Types
{-# LINE 55 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
import System.GIO.Types (Icon (..), IconClass, toIcon)
{-# LINE 60 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
appLaunchContextNew :: IO AppLaunchContext
appLaunchContextNew :: IO AppLaunchContext
appLaunchContextNew =
(ForeignPtr AppLaunchContext -> AppLaunchContext,
FinalizerPtr AppLaunchContext)
-> IO (Ptr AppLaunchContext) -> IO AppLaunchContext
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr AppLaunchContext -> AppLaunchContext,
FinalizerPtr AppLaunchContext)
forall {a}.
(ForeignPtr AppLaunchContext -> AppLaunchContext, FinalizerPtr a)
mkAppLaunchContext (IO (Ptr AppLaunchContext) -> IO AppLaunchContext)
-> IO (Ptr AppLaunchContext) -> IO AppLaunchContext
forall a b. (a -> b) -> a -> b
$
IO (Ptr AppLaunchContext)
gdk_app_launch_context_new
{-# LINE 70 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
appLaunchContextSetDesktop :: AppLaunchContext -> Int -> IO ()
appLaunchContextSetDesktop :: AppLaunchContext -> Int -> IO ()
appLaunchContextSetDesktop AppLaunchContext
self Int
desktop =
(\(AppLaunchContext ForeignPtr AppLaunchContext
arg1) CInt
arg2 -> ForeignPtr AppLaunchContext
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AppLaunchContext
arg1 ((Ptr AppLaunchContext -> IO ()) -> IO ())
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AppLaunchContext
argPtr1 ->Ptr AppLaunchContext -> CInt -> IO ()
gdk_app_launch_context_set_desktop Ptr AppLaunchContext
argPtr1 CInt
arg2)
{-# LINE 83 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
self
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
desktop)
appLaunchContextSetDisplay :: AppLaunchContext -> Display -> IO ()
appLaunchContextSetDisplay :: AppLaunchContext -> Display -> IO ()
appLaunchContextSetDisplay AppLaunchContext
self Display
display =
(\(AppLaunchContext ForeignPtr AppLaunchContext
arg1) (Display ForeignPtr Display
arg2) -> ForeignPtr AppLaunchContext
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AppLaunchContext
arg1 ((Ptr AppLaunchContext -> IO ()) -> IO ())
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AppLaunchContext
argPtr1 ->ForeignPtr Display -> (Ptr Display -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Display
arg2 ((Ptr Display -> IO ()) -> IO ())
-> (Ptr Display -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Display
argPtr2 ->Ptr AppLaunchContext -> Ptr Display -> IO ()
gdk_app_launch_context_set_display Ptr AppLaunchContext
argPtr1 Ptr Display
argPtr2)
{-# LINE 91 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
self
Display
display
appLaunchContextSetIcon :: IconClass icon => AppLaunchContext -> icon -> IO ()
appLaunchContextSetIcon :: forall icon. IconClass icon => AppLaunchContext -> icon -> IO ()
appLaunchContextSetIcon AppLaunchContext
self icon
icon =
(\(AppLaunchContext ForeignPtr AppLaunchContext
arg1) (Icon ForeignPtr Icon
arg2) -> ForeignPtr AppLaunchContext
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AppLaunchContext
arg1 ((Ptr AppLaunchContext -> IO ()) -> IO ())
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AppLaunchContext
argPtr1 ->ForeignPtr Icon -> (Ptr Icon -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Icon
arg2 ((Ptr Icon -> IO ()) -> IO ()) -> (Ptr Icon -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Icon
argPtr2 ->Ptr AppLaunchContext -> Ptr Icon -> IO ()
gdk_app_launch_context_set_icon Ptr AppLaunchContext
argPtr1 Ptr Icon
argPtr2)
{-# LINE 101 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
self
(icon -> Icon
forall o. IconClass o => o -> Icon
toIcon icon
icon)
appLaunchContextSetIconName :: GlibString string => AppLaunchContext -> string -> IO ()
appLaunchContextSetIconName :: forall string.
GlibString string =>
AppLaunchContext -> string -> IO ()
appLaunchContextSetIconName AppLaunchContext
self string
iconName =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
iconName ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
iconNamePtr ->
(\(AppLaunchContext ForeignPtr AppLaunchContext
arg1) CString
arg2 -> ForeignPtr AppLaunchContext
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AppLaunchContext
arg1 ((Ptr AppLaunchContext -> IO ()) -> IO ())
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AppLaunchContext
argPtr1 ->Ptr AppLaunchContext -> CString -> IO ()
gdk_app_launch_context_set_icon_name Ptr AppLaunchContext
argPtr1 CString
arg2)
{-# LINE 116 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
self
CString
iconNamePtr
appLaunchContextSetScreen :: AppLaunchContext -> Screen -> IO ()
appLaunchContextSetScreen :: AppLaunchContext -> Screen -> IO ()
appLaunchContextSetScreen AppLaunchContext
self Screen
screen =
(\(AppLaunchContext ForeignPtr AppLaunchContext
arg1) (Screen ForeignPtr Screen
arg2) -> ForeignPtr AppLaunchContext
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AppLaunchContext
arg1 ((Ptr AppLaunchContext -> IO ()) -> IO ())
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AppLaunchContext
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 AppLaunchContext -> Ptr Screen -> IO ()
gdk_app_launch_context_set_screen Ptr AppLaunchContext
argPtr1 Ptr Screen
argPtr2)
{-# LINE 127 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
self
Screen
screen
appLaunchContextSetTimestamp :: AppLaunchContext -> TimeStamp -> IO ()
appLaunchContextSetTimestamp :: AppLaunchContext -> TimeStamp -> IO ()
appLaunchContextSetTimestamp AppLaunchContext
self TimeStamp
timestamp =
(\(AppLaunchContext ForeignPtr AppLaunchContext
arg1) CUInt
arg2 -> ForeignPtr AppLaunchContext
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AppLaunchContext
arg1 ((Ptr AppLaunchContext -> IO ()) -> IO ())
-> (Ptr AppLaunchContext -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AppLaunchContext
argPtr1 ->Ptr AppLaunchContext -> CUInt -> IO ()
gdk_app_launch_context_set_timestamp Ptr AppLaunchContext
argPtr1 CUInt
arg2)
{-# LINE 138 "./Graphics/UI/Gtk/Gdk/AppLaunchContext.chs" #-}
self
(TimeStamp -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral TimeStamp
timestamp)
foreign import ccall safe "gdk_app_launch_context_new"
gdk_app_launch_context_new :: (IO (Ptr AppLaunchContext))
foreign import ccall safe "gdk_app_launch_context_set_desktop"
gdk_app_launch_context_set_desktop :: ((Ptr AppLaunchContext) -> (CInt -> (IO ())))
foreign import ccall safe "gdk_app_launch_context_set_display"
gdk_app_launch_context_set_display :: ((Ptr AppLaunchContext) -> ((Ptr Display) -> (IO ())))
foreign import ccall safe "gdk_app_launch_context_set_icon"
gdk_app_launch_context_set_icon :: ((Ptr AppLaunchContext) -> ((Ptr Icon) -> (IO ())))
foreign import ccall safe "gdk_app_launch_context_set_icon_name"
gdk_app_launch_context_set_icon_name :: ((Ptr AppLaunchContext) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gdk_app_launch_context_set_screen"
gdk_app_launch_context_set_screen :: ((Ptr AppLaunchContext) -> ((Ptr Screen) -> (IO ())))
foreign import ccall safe "gdk_app_launch_context_set_timestamp"
gdk_app_launch_context_set_timestamp :: ((Ptr AppLaunchContext) -> (CUInt -> (IO ())))