{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.WidgetAccessible
(
WidgetAccessible(..) ,
IsWidgetAccessible ,
toWidgetAccessible ,
#if defined(ENABLE_OVERLOADING)
ResolveWidgetAccessibleMethod ,
#endif
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
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 Control.Monad.IO.Class as MIO
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 GHC.Records as R
import qualified GI.Atk.Interfaces.Component as Atk.Component
import qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.Accessible as Gtk.Accessible
newtype WidgetAccessible = WidgetAccessible (SP.ManagedPtr WidgetAccessible)
deriving (WidgetAccessible -> WidgetAccessible -> Bool
(WidgetAccessible -> WidgetAccessible -> Bool)
-> (WidgetAccessible -> WidgetAccessible -> Bool)
-> Eq WidgetAccessible
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WidgetAccessible -> WidgetAccessible -> Bool
$c/= :: WidgetAccessible -> WidgetAccessible -> Bool
== :: WidgetAccessible -> WidgetAccessible -> Bool
$c== :: WidgetAccessible -> WidgetAccessible -> Bool
Eq)
instance SP.ManagedPtrNewtype WidgetAccessible where
toManagedPtr :: WidgetAccessible -> ManagedPtr WidgetAccessible
toManagedPtr (WidgetAccessible ManagedPtr WidgetAccessible
p) = ManagedPtr WidgetAccessible
p
foreign import ccall "gtk_widget_accessible_get_type"
c_gtk_widget_accessible_get_type :: IO B.Types.GType
instance B.Types.TypedObject WidgetAccessible where
glibType :: IO GType
glibType = IO GType
c_gtk_widget_accessible_get_type
instance B.Types.GObject WidgetAccessible
class (SP.GObject o, O.IsDescendantOf WidgetAccessible o) => IsWidgetAccessible o
instance (SP.GObject o, O.IsDescendantOf WidgetAccessible o) => IsWidgetAccessible o
instance O.HasParentTypes WidgetAccessible
type instance O.ParentTypes WidgetAccessible = '[Gtk.Accessible.Accessible, Atk.Object.Object, GObject.Object.Object, Atk.Component.Component]
toWidgetAccessible :: (MIO.MonadIO m, IsWidgetAccessible o) => o -> m WidgetAccessible
toWidgetAccessible :: forall (m :: * -> *) o.
(MonadIO m, IsWidgetAccessible o) =>
o -> m WidgetAccessible
toWidgetAccessible = IO WidgetAccessible -> m WidgetAccessible
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WidgetAccessible -> m WidgetAccessible)
-> (o -> IO WidgetAccessible) -> o -> m WidgetAccessible
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WidgetAccessible -> WidgetAccessible)
-> o -> IO WidgetAccessible
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr WidgetAccessible -> WidgetAccessible
WidgetAccessible
instance B.GValue.IsGValue (Maybe WidgetAccessible) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_widget_accessible_get_type
gvalueSet_ :: Ptr GValue -> Maybe WidgetAccessible -> IO ()
gvalueSet_ Ptr GValue
gv Maybe WidgetAccessible
P.Nothing = Ptr GValue -> Ptr WidgetAccessible -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr WidgetAccessible
forall a. Ptr a
FP.nullPtr :: FP.Ptr WidgetAccessible)
gvalueSet_ Ptr GValue
gv (P.Just WidgetAccessible
obj) = WidgetAccessible -> (Ptr WidgetAccessible -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WidgetAccessible
obj (Ptr GValue -> Ptr WidgetAccessible -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe WidgetAccessible)
gvalueGet_ Ptr GValue
gv = do
Ptr WidgetAccessible
ptr <- Ptr GValue -> IO (Ptr WidgetAccessible)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr WidgetAccessible)
if Ptr WidgetAccessible
ptr Ptr WidgetAccessible -> Ptr WidgetAccessible -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr WidgetAccessible
forall a. Ptr a
FP.nullPtr
then WidgetAccessible -> Maybe WidgetAccessible
forall a. a -> Maybe a
P.Just (WidgetAccessible -> Maybe WidgetAccessible)
-> IO WidgetAccessible -> IO (Maybe WidgetAccessible)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr WidgetAccessible -> WidgetAccessible)
-> Ptr WidgetAccessible -> IO WidgetAccessible
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WidgetAccessible -> WidgetAccessible
WidgetAccessible Ptr WidgetAccessible
ptr
else Maybe WidgetAccessible -> IO (Maybe WidgetAccessible)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WidgetAccessible
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveWidgetAccessibleMethod (t :: Symbol) (o :: *) :: * where
ResolveWidgetAccessibleMethod "addRelationship" o = Atk.Object.ObjectAddRelationshipMethodInfo
ResolveWidgetAccessibleMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWidgetAccessibleMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWidgetAccessibleMethod "connectWidgetDestroyed" o = Gtk.Accessible.AccessibleConnectWidgetDestroyedMethodInfo
ResolveWidgetAccessibleMethod "contains" o = Atk.Component.ComponentContainsMethodInfo
ResolveWidgetAccessibleMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWidgetAccessibleMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWidgetAccessibleMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWidgetAccessibleMethod "grabFocus" o = Atk.Component.ComponentGrabFocusMethodInfo
ResolveWidgetAccessibleMethod "initialize" o = Atk.Object.ObjectInitializeMethodInfo
ResolveWidgetAccessibleMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWidgetAccessibleMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWidgetAccessibleMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWidgetAccessibleMethod "notifyStateChange" o = Atk.Object.ObjectNotifyStateChangeMethodInfo
ResolveWidgetAccessibleMethod "peekParent" o = Atk.Object.ObjectPeekParentMethodInfo
ResolveWidgetAccessibleMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWidgetAccessibleMethod "refAccessibleAtPoint" o = Atk.Component.ComponentRefAccessibleAtPointMethodInfo
ResolveWidgetAccessibleMethod "refAccessibleChild" o = Atk.Object.ObjectRefAccessibleChildMethodInfo
ResolveWidgetAccessibleMethod "refRelationSet" o = Atk.Object.ObjectRefRelationSetMethodInfo
ResolveWidgetAccessibleMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWidgetAccessibleMethod "refStateSet" o = Atk.Object.ObjectRefStateSetMethodInfo
ResolveWidgetAccessibleMethod "removeFocusHandler" o = Atk.Component.ComponentRemoveFocusHandlerMethodInfo
ResolveWidgetAccessibleMethod "removePropertyChangeHandler" o = Atk.Object.ObjectRemovePropertyChangeHandlerMethodInfo
ResolveWidgetAccessibleMethod "removeRelationship" o = Atk.Object.ObjectRemoveRelationshipMethodInfo
ResolveWidgetAccessibleMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWidgetAccessibleMethod "scrollTo" o = Atk.Component.ComponentScrollToMethodInfo
ResolveWidgetAccessibleMethod "scrollToPoint" o = Atk.Component.ComponentScrollToPointMethodInfo
ResolveWidgetAccessibleMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWidgetAccessibleMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWidgetAccessibleMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWidgetAccessibleMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWidgetAccessibleMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWidgetAccessibleMethod "getAccessibleId" o = Atk.Object.ObjectGetAccessibleIdMethodInfo
ResolveWidgetAccessibleMethod "getAlpha" o = Atk.Component.ComponentGetAlphaMethodInfo
ResolveWidgetAccessibleMethod "getAttributes" o = Atk.Object.ObjectGetAttributesMethodInfo
ResolveWidgetAccessibleMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWidgetAccessibleMethod "getDescription" o = Atk.Object.ObjectGetDescriptionMethodInfo
ResolveWidgetAccessibleMethod "getExtents" o = Atk.Component.ComponentGetExtentsMethodInfo
ResolveWidgetAccessibleMethod "getIndexInParent" o = Atk.Object.ObjectGetIndexInParentMethodInfo
ResolveWidgetAccessibleMethod "getLayer" o = Atk.Object.ObjectGetLayerMethodInfo
ResolveWidgetAccessibleMethod "getMdiZorder" o = Atk.Object.ObjectGetMdiZorderMethodInfo
ResolveWidgetAccessibleMethod "getNAccessibleChildren" o = Atk.Object.ObjectGetNAccessibleChildrenMethodInfo
ResolveWidgetAccessibleMethod "getName" o = Atk.Object.ObjectGetNameMethodInfo
ResolveWidgetAccessibleMethod "getObjectLocale" o = Atk.Object.ObjectGetObjectLocaleMethodInfo
ResolveWidgetAccessibleMethod "getParent" o = Atk.Object.ObjectGetParentMethodInfo
ResolveWidgetAccessibleMethod "getPosition" o = Atk.Component.ComponentGetPositionMethodInfo
ResolveWidgetAccessibleMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWidgetAccessibleMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWidgetAccessibleMethod "getRole" o = Atk.Object.ObjectGetRoleMethodInfo
ResolveWidgetAccessibleMethod "getSize" o = Atk.Component.ComponentGetSizeMethodInfo
ResolveWidgetAccessibleMethod "getWidget" o = Gtk.Accessible.AccessibleGetWidgetMethodInfo
ResolveWidgetAccessibleMethod "setAccessibleId" o = Atk.Object.ObjectSetAccessibleIdMethodInfo
ResolveWidgetAccessibleMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWidgetAccessibleMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWidgetAccessibleMethod "setDescription" o = Atk.Object.ObjectSetDescriptionMethodInfo
ResolveWidgetAccessibleMethod "setExtents" o = Atk.Component.ComponentSetExtentsMethodInfo
ResolveWidgetAccessibleMethod "setName" o = Atk.Object.ObjectSetNameMethodInfo
ResolveWidgetAccessibleMethod "setParent" o = Atk.Object.ObjectSetParentMethodInfo
ResolveWidgetAccessibleMethod "setPosition" o = Atk.Component.ComponentSetPositionMethodInfo
ResolveWidgetAccessibleMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWidgetAccessibleMethod "setRole" o = Atk.Object.ObjectSetRoleMethodInfo
ResolveWidgetAccessibleMethod "setSize" o = Atk.Component.ComponentSetSizeMethodInfo
ResolveWidgetAccessibleMethod "setWidget" o = Gtk.Accessible.AccessibleSetWidgetMethodInfo
ResolveWidgetAccessibleMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWidgetAccessibleMethod t WidgetAccessible, O.OverloadedMethod info WidgetAccessible p) => OL.IsLabel t (WidgetAccessible -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWidgetAccessibleMethod t WidgetAccessible, O.OverloadedMethod info WidgetAccessible p, R.HasField t WidgetAccessible p) => R.HasField t WidgetAccessible p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveWidgetAccessibleMethod t WidgetAccessible, O.OverloadedMethodInfo info WidgetAccessible) => OL.IsLabel t (O.MethodProxy info WidgetAccessible) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WidgetAccessible
type instance O.AttributeList WidgetAccessible = WidgetAccessibleAttributeList
type WidgetAccessibleAttributeList = ('[ '("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), '("widget", Gtk.Accessible.AccessibleWidgetPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WidgetAccessible = WidgetAccessibleSignalList
type WidgetAccessibleSignalList = ('[ '("activeDescendantChanged", Atk.Object.ObjectActiveDescendantChangedSignalInfo), '("boundsChanged", Atk.Component.ComponentBoundsChangedSignalInfo), '("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