module GI.Gtk.Objects.WindowGroup
(
WindowGroup(..) ,
IsWindowGroup ,
toWindowGroup ,
noWindowGroup ,
WindowGroupAddWindowMethodInfo ,
windowGroupAddWindow ,
WindowGroupGetCurrentDeviceGrabMethodInfo,
windowGroupGetCurrentDeviceGrab ,
WindowGroupGetCurrentGrabMethodInfo ,
windowGroupGetCurrentGrab ,
WindowGroupListWindowsMethodInfo ,
windowGroupListWindows ,
windowGroupNew ,
WindowGroupRemoveWindowMethodInfo ,
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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import 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 => IsWindowGroup o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError WindowGroup a) =>
IsWindowGroup a
#endif
instance IsWindowGroup WindowGroup
instance GObject.Object.IsObject WindowGroup
toWindowGroup :: IsWindowGroup o => o -> IO WindowGroup
toWindowGroup = unsafeCastTo WindowGroup
noWindowGroup :: Maybe WindowGroup
noWindowGroup = Nothing
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 "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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveWindowGroupMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
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 "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWindowGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWindowGroupMethod t WindowGroup, O.MethodInfo info WindowGroup p) => O.IsLabelProxy t (WindowGroup -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveWindowGroupMethod t WindowGroup, O.MethodInfo info WindowGroup p) => O.IsLabel t (WindowGroup -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
instance O.HasAttributeList WindowGroup
type instance O.AttributeList WindowGroup = WindowGroupAttributeList
type WindowGroupAttributeList = ('[ ] :: [(Symbol, *)])
type instance O.SignalList WindowGroup = WindowGroupSignalList
type WindowGroupSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
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'
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 ()
data WindowGroupAddWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindowGroup a, Gtk.Window.IsWindow b) => O.MethodInfo WindowGroupAddWindowMethodInfo a signature where
overloadedMethod _ = windowGroupAddWindow
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
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
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'
data WindowGroupGetCurrentGrabMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsWindowGroup a) => O.MethodInfo WindowGroupGetCurrentGrabMethodInfo a signature where
overloadedMethod _ = windowGroupGetCurrentGrab
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''
data WindowGroupListWindowsMethodInfo
instance (signature ~ (m [Gtk.Window.Window]), MonadIO m, IsWindowGroup a) => O.MethodInfo WindowGroupListWindowsMethodInfo a signature where
overloadedMethod _ = windowGroupListWindows
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 ()
data WindowGroupRemoveWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindowGroup a, Gtk.Window.IsWindow b) => O.MethodInfo WindowGroupRemoveWindowMethodInfo a signature where
overloadedMethod _ = windowGroupRemoveWindow