#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.WindowGroup
(
WindowGroup(..) ,
IsWindowGroup ,
toWindowGroup ,
noWindowGroup ,
#if ENABLE_OVERLOADING
WindowGroupAddWindowMethodInfo ,
#endif
windowGroupAddWindow ,
#if ENABLE_OVERLOADING
WindowGroupGetCurrentDeviceGrabMethodInfo,
#endif
windowGroupGetCurrentDeviceGrab ,
#if ENABLE_OVERLOADING
WindowGroupGetCurrentGrabMethodInfo ,
#endif
windowGroupGetCurrentGrab ,
#if ENABLE_OVERLOADING
WindowGroupListWindowsMethodInfo ,
#endif
windowGroupListWindows ,
windowGroupNew ,
#if ENABLE_OVERLOADING
WindowGroupRemoveWindowMethodInfo ,
#endif
windowGroupRemoveWindow ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
newtype WindowGroup = WindowGroup (ManagedPtr WindowGroup)
foreign import ccall "gtk_window_group_get_type"
c_gtk_window_group_get_type :: IO GType
instance GObject WindowGroup where
gobjectType = c_gtk_window_group_get_type
class (GObject o, O.IsDescendantOf WindowGroup o) => IsWindowGroup o
instance (GObject o, O.IsDescendantOf WindowGroup o) => IsWindowGroup o
instance O.HasParentTypes WindowGroup
type instance O.ParentTypes WindowGroup = '[GObject.Object.Object]
toWindowGroup :: (MonadIO m, IsWindowGroup o) => o -> m WindowGroup
toWindowGroup = liftIO . unsafeCastTo WindowGroup
noWindowGroup :: Maybe WindowGroup
noWindowGroup = Nothing
#if ENABLE_OVERLOADING
type family ResolveWindowGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveWindowGroupMethod "addWindow" o = WindowGroupAddWindowMethodInfo
ResolveWindowGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWindowGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWindowGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWindowGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWindowGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWindowGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWindowGroupMethod "listWindows" o = WindowGroupListWindowsMethodInfo
ResolveWindowGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWindowGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWindowGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWindowGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWindowGroupMethod "removeWindow" o = WindowGroupRemoveWindowMethodInfo
ResolveWindowGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWindowGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWindowGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWindowGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWindowGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWindowGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWindowGroupMethod "getCurrentDeviceGrab" o = WindowGroupGetCurrentDeviceGrabMethodInfo
ResolveWindowGroupMethod "getCurrentGrab" o = WindowGroupGetCurrentGrabMethodInfo
ResolveWindowGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWindowGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWindowGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWindowGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWindowGroupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWindowGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWindowGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWindowGroupMethod t WindowGroup, O.MethodInfo info WindowGroup p) => OL.IsLabel t (WindowGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList WindowGroup
type instance O.AttributeList WindowGroup = WindowGroupAttributeList
type WindowGroupAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList WindowGroup = WindowGroupSignalList
type WindowGroupSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_window_group_new" gtk_window_group_new ::
IO (Ptr WindowGroup)
windowGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m WindowGroup
windowGroupNew = liftIO $ do
result <- gtk_window_group_new
checkUnexpectedReturnNULL "windowGroupNew" result
result' <- (wrapObject WindowGroup) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_window_group_add_window" gtk_window_group_add_window ::
Ptr WindowGroup ->
Ptr Gtk.Window.Window ->
IO ()
windowGroupAddWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsWindowGroup a, Gtk.Window.IsWindow b) =>
a
-> b
-> m ()
windowGroupAddWindow windowGroup window = liftIO $ do
windowGroup' <- unsafeManagedPtrCastPtr windowGroup
window' <- unsafeManagedPtrCastPtr window
gtk_window_group_add_window windowGroup' window'
touchManagedPtr windowGroup
touchManagedPtr window
return ()
#if ENABLE_OVERLOADING
data WindowGroupAddWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindowGroup a, Gtk.Window.IsWindow b) => O.MethodInfo WindowGroupAddWindowMethodInfo a signature where
overloadedMethod _ = windowGroupAddWindow
#endif
foreign import ccall "gtk_window_group_get_current_device_grab" gtk_window_group_get_current_device_grab ::
Ptr WindowGroup ->
Ptr Gdk.Device.Device ->
IO (Ptr Gtk.Widget.Widget)
windowGroupGetCurrentDeviceGrab ::
(B.CallStack.HasCallStack, MonadIO m, IsWindowGroup a, Gdk.Device.IsDevice b) =>
a
-> b
-> m (Maybe Gtk.Widget.Widget)
windowGroupGetCurrentDeviceGrab windowGroup device = liftIO $ do
windowGroup' <- unsafeManagedPtrCastPtr windowGroup
device' <- unsafeManagedPtrCastPtr device
result <- gtk_window_group_get_current_device_grab windowGroup' device'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gtk.Widget.Widget) result'
return result''
touchManagedPtr windowGroup
touchManagedPtr device
return maybeResult
#if ENABLE_OVERLOADING
data WindowGroupGetCurrentDeviceGrabMethodInfo
instance (signature ~ (b -> m (Maybe Gtk.Widget.Widget)), MonadIO m, IsWindowGroup a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGroupGetCurrentDeviceGrabMethodInfo a signature where
overloadedMethod _ = windowGroupGetCurrentDeviceGrab
#endif
foreign import ccall "gtk_window_group_get_current_grab" gtk_window_group_get_current_grab ::
Ptr WindowGroup ->
IO (Ptr Gtk.Widget.Widget)
windowGroupGetCurrentGrab ::
(B.CallStack.HasCallStack, MonadIO m, IsWindowGroup a) =>
a
-> m Gtk.Widget.Widget
windowGroupGetCurrentGrab windowGroup = liftIO $ do
windowGroup' <- unsafeManagedPtrCastPtr windowGroup
result <- gtk_window_group_get_current_grab windowGroup'
checkUnexpectedReturnNULL "windowGroupGetCurrentGrab" result
result' <- (newObject Gtk.Widget.Widget) result
touchManagedPtr windowGroup
return result'
#if ENABLE_OVERLOADING
data WindowGroupGetCurrentGrabMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsWindowGroup a) => O.MethodInfo WindowGroupGetCurrentGrabMethodInfo a signature where
overloadedMethod _ = windowGroupGetCurrentGrab
#endif
foreign import ccall "gtk_window_group_list_windows" gtk_window_group_list_windows ::
Ptr WindowGroup ->
IO (Ptr (GList (Ptr Gtk.Window.Window)))
windowGroupListWindows ::
(B.CallStack.HasCallStack, MonadIO m, IsWindowGroup a) =>
a
-> m [Gtk.Window.Window]
windowGroupListWindows windowGroup = liftIO $ do
windowGroup' <- unsafeManagedPtrCastPtr windowGroup
result <- gtk_window_group_list_windows windowGroup'
result' <- unpackGList result
result'' <- mapM (newObject Gtk.Window.Window) result'
g_list_free result
touchManagedPtr windowGroup
return result''
#if ENABLE_OVERLOADING
data WindowGroupListWindowsMethodInfo
instance (signature ~ (m [Gtk.Window.Window]), MonadIO m, IsWindowGroup a) => O.MethodInfo WindowGroupListWindowsMethodInfo a signature where
overloadedMethod _ = windowGroupListWindows
#endif
foreign import ccall "gtk_window_group_remove_window" gtk_window_group_remove_window ::
Ptr WindowGroup ->
Ptr Gtk.Window.Window ->
IO ()
windowGroupRemoveWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsWindowGroup a, Gtk.Window.IsWindow b) =>
a
-> b
-> m ()
windowGroupRemoveWindow windowGroup window = liftIO $ do
windowGroup' <- unsafeManagedPtrCastPtr windowGroup
window' <- unsafeManagedPtrCastPtr window
gtk_window_group_remove_window windowGroup' window'
touchManagedPtr windowGroup
touchManagedPtr window
return ()
#if ENABLE_OVERLOADING
data WindowGroupRemoveWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindowGroup a, Gtk.Window.IsWindow b) => O.MethodInfo WindowGroupRemoveWindowMethodInfo a signature where
overloadedMethod _ = windowGroupRemoveWindow
#endif