{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.ToplevelAccessible
(
ToplevelAccessible(..) ,
IsToplevelAccessible ,
toToplevelAccessible ,
noToplevelAccessible ,
#if defined(ENABLE_OVERLOADING)
ResolveToplevelAccessibleMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ToplevelAccessibleGetChildrenMethodInfo ,
#endif
toplevelAccessibleGetChildren ,
) 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.GI.Base.Signals as B.Signals
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.Atk.Objects.Object as Atk.Object
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
newtype ToplevelAccessible = ToplevelAccessible (ManagedPtr ToplevelAccessible)
deriving (ToplevelAccessible -> ToplevelAccessible -> Bool
(ToplevelAccessible -> ToplevelAccessible -> Bool)
-> (ToplevelAccessible -> ToplevelAccessible -> Bool)
-> Eq ToplevelAccessible
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ToplevelAccessible -> ToplevelAccessible -> Bool
$c/= :: ToplevelAccessible -> ToplevelAccessible -> Bool
== :: ToplevelAccessible -> ToplevelAccessible -> Bool
$c== :: ToplevelAccessible -> ToplevelAccessible -> Bool
Eq)
foreign import ccall "gtk_toplevel_accessible_get_type"
c_gtk_toplevel_accessible_get_type :: IO GType
instance GObject ToplevelAccessible where
gobjectType :: IO GType
gobjectType = IO GType
c_gtk_toplevel_accessible_get_type
instance B.GValue.IsGValue ToplevelAccessible where
toGValue :: ToplevelAccessible -> IO GValue
toGValue o :: ToplevelAccessible
o = do
GType
gtype <- IO GType
c_gtk_toplevel_accessible_get_type
ToplevelAccessible
-> (Ptr ToplevelAccessible -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ToplevelAccessible
o (GType
-> (GValue -> Ptr ToplevelAccessible -> IO ())
-> Ptr ToplevelAccessible
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr ToplevelAccessible -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO ToplevelAccessible
fromGValue gv :: GValue
gv = do
Ptr ToplevelAccessible
ptr <- GValue -> IO (Ptr ToplevelAccessible)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr ToplevelAccessible)
(ManagedPtr ToplevelAccessible -> ToplevelAccessible)
-> Ptr ToplevelAccessible -> IO ToplevelAccessible
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ToplevelAccessible -> ToplevelAccessible
ToplevelAccessible Ptr ToplevelAccessible
ptr
class (GObject o, O.IsDescendantOf ToplevelAccessible o) => IsToplevelAccessible o
instance (GObject o, O.IsDescendantOf ToplevelAccessible o) => IsToplevelAccessible o
instance O.HasParentTypes ToplevelAccessible
type instance O.ParentTypes ToplevelAccessible = '[Atk.Object.Object, GObject.Object.Object]
toToplevelAccessible :: (MonadIO m, IsToplevelAccessible o) => o -> m ToplevelAccessible
toToplevelAccessible :: o -> m ToplevelAccessible
toToplevelAccessible = IO ToplevelAccessible -> m ToplevelAccessible
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ToplevelAccessible -> m ToplevelAccessible)
-> (o -> IO ToplevelAccessible) -> o -> m ToplevelAccessible
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ToplevelAccessible -> ToplevelAccessible)
-> o -> IO ToplevelAccessible
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr ToplevelAccessible -> ToplevelAccessible
ToplevelAccessible
noToplevelAccessible :: Maybe ToplevelAccessible
noToplevelAccessible :: Maybe ToplevelAccessible
noToplevelAccessible = Maybe ToplevelAccessible
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveToplevelAccessibleMethod (t :: Symbol) (o :: *) :: * where
ResolveToplevelAccessibleMethod "addRelationship" o = Atk.Object.ObjectAddRelationshipMethodInfo
ResolveToplevelAccessibleMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveToplevelAccessibleMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveToplevelAccessibleMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveToplevelAccessibleMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveToplevelAccessibleMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveToplevelAccessibleMethod "initialize" o = Atk.Object.ObjectInitializeMethodInfo
ResolveToplevelAccessibleMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveToplevelAccessibleMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveToplevelAccessibleMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveToplevelAccessibleMethod "notifyStateChange" o = Atk.Object.ObjectNotifyStateChangeMethodInfo
ResolveToplevelAccessibleMethod "peekParent" o = Atk.Object.ObjectPeekParentMethodInfo
ResolveToplevelAccessibleMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveToplevelAccessibleMethod "refAccessibleChild" o = Atk.Object.ObjectRefAccessibleChildMethodInfo
ResolveToplevelAccessibleMethod "refRelationSet" o = Atk.Object.ObjectRefRelationSetMethodInfo
ResolveToplevelAccessibleMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveToplevelAccessibleMethod "refStateSet" o = Atk.Object.ObjectRefStateSetMethodInfo
ResolveToplevelAccessibleMethod "removePropertyChangeHandler" o = Atk.Object.ObjectRemovePropertyChangeHandlerMethodInfo
ResolveToplevelAccessibleMethod "removeRelationship" o = Atk.Object.ObjectRemoveRelationshipMethodInfo
ResolveToplevelAccessibleMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveToplevelAccessibleMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveToplevelAccessibleMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveToplevelAccessibleMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveToplevelAccessibleMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveToplevelAccessibleMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveToplevelAccessibleMethod "getAttributes" o = Atk.Object.ObjectGetAttributesMethodInfo
ResolveToplevelAccessibleMethod "getChildren" o = ToplevelAccessibleGetChildrenMethodInfo
ResolveToplevelAccessibleMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveToplevelAccessibleMethod "getDescription" o = Atk.Object.ObjectGetDescriptionMethodInfo
ResolveToplevelAccessibleMethod "getIndexInParent" o = Atk.Object.ObjectGetIndexInParentMethodInfo
ResolveToplevelAccessibleMethod "getLayer" o = Atk.Object.ObjectGetLayerMethodInfo
ResolveToplevelAccessibleMethod "getMdiZorder" o = Atk.Object.ObjectGetMdiZorderMethodInfo
ResolveToplevelAccessibleMethod "getNAccessibleChildren" o = Atk.Object.ObjectGetNAccessibleChildrenMethodInfo
ResolveToplevelAccessibleMethod "getName" o = Atk.Object.ObjectGetNameMethodInfo
ResolveToplevelAccessibleMethod "getObjectLocale" o = Atk.Object.ObjectGetObjectLocaleMethodInfo
ResolveToplevelAccessibleMethod "getParent" o = Atk.Object.ObjectGetParentMethodInfo
ResolveToplevelAccessibleMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveToplevelAccessibleMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveToplevelAccessibleMethod "getRole" o = Atk.Object.ObjectGetRoleMethodInfo
ResolveToplevelAccessibleMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveToplevelAccessibleMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveToplevelAccessibleMethod "setDescription" o = Atk.Object.ObjectSetDescriptionMethodInfo
ResolveToplevelAccessibleMethod "setName" o = Atk.Object.ObjectSetNameMethodInfo
ResolveToplevelAccessibleMethod "setParent" o = Atk.Object.ObjectSetParentMethodInfo
ResolveToplevelAccessibleMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveToplevelAccessibleMethod "setRole" o = Atk.Object.ObjectSetRoleMethodInfo
ResolveToplevelAccessibleMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveToplevelAccessibleMethod t ToplevelAccessible, O.MethodInfo info ToplevelAccessible p) => OL.IsLabel t (ToplevelAccessible -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ToplevelAccessible
type instance O.AttributeList ToplevelAccessible = ToplevelAccessibleAttributeList
type ToplevelAccessibleAttributeList = ('[ '("accessibleComponentLayer", Atk.Object.ObjectAccessibleComponentLayerPropertyInfo), '("accessibleComponentMdiZorder", Atk.Object.ObjectAccessibleComponentMdiZorderPropertyInfo), '("accessibleDescription", Atk.Object.ObjectAccessibleDescriptionPropertyInfo), '("accessibleHypertextNlinks", Atk.Object.ObjectAccessibleHypertextNlinksPropertyInfo), '("accessibleName", Atk.Object.ObjectAccessibleNamePropertyInfo), '("accessibleParent", Atk.Object.ObjectAccessibleParentPropertyInfo), '("accessibleRole", Atk.Object.ObjectAccessibleRolePropertyInfo), '("accessibleTableCaption", Atk.Object.ObjectAccessibleTableCaptionPropertyInfo), '("accessibleTableCaptionObject", Atk.Object.ObjectAccessibleTableCaptionObjectPropertyInfo), '("accessibleTableColumnDescription", Atk.Object.ObjectAccessibleTableColumnDescriptionPropertyInfo), '("accessibleTableColumnHeader", Atk.Object.ObjectAccessibleTableColumnHeaderPropertyInfo), '("accessibleTableRowDescription", Atk.Object.ObjectAccessibleTableRowDescriptionPropertyInfo), '("accessibleTableRowHeader", Atk.Object.ObjectAccessibleTableRowHeaderPropertyInfo), '("accessibleTableSummary", Atk.Object.ObjectAccessibleTableSummaryPropertyInfo), '("accessibleValue", Atk.Object.ObjectAccessibleValuePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ToplevelAccessible = ToplevelAccessibleSignalList
type ToplevelAccessibleSignalList = ('[ '("activeDescendantChanged", Atk.Object.ObjectActiveDescendantChangedSignalInfo), '("childrenChanged", Atk.Object.ObjectChildrenChangedSignalInfo), '("focusEvent", Atk.Object.ObjectFocusEventSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("propertyChange", Atk.Object.ObjectPropertyChangeSignalInfo), '("stateChange", Atk.Object.ObjectStateChangeSignalInfo), '("visibleDataChanged", Atk.Object.ObjectVisibleDataChangedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_toplevel_accessible_get_children" gtk_toplevel_accessible_get_children ::
Ptr ToplevelAccessible ->
IO (Ptr (GList (Ptr Gtk.Window.Window)))
toplevelAccessibleGetChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsToplevelAccessible a) =>
a
-> m [Gtk.Window.Window]
toplevelAccessibleGetChildren :: a -> m [Window]
toplevelAccessibleGetChildren accessible :: a
accessible = IO [Window] -> m [Window]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
Ptr ToplevelAccessible
accessible' <- a -> IO (Ptr ToplevelAccessible)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
accessible
Ptr (GList (Ptr Window))
result <- Ptr ToplevelAccessible -> IO (Ptr (GList (Ptr Window)))
gtk_toplevel_accessible_get_children Ptr ToplevelAccessible
accessible'
[Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
[Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) [Ptr Window]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
accessible
[Window] -> IO [Window]
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''
#if defined(ENABLE_OVERLOADING)
data ToplevelAccessibleGetChildrenMethodInfo
instance (signature ~ (m [Gtk.Window.Window]), MonadIO m, IsToplevelAccessible a) => O.MethodInfo ToplevelAccessibleGetChildrenMethodInfo a signature where
overloadedMethod = toplevelAccessibleGetChildren
#endif