{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Objects.WidgetAccessible
    ( 

-- * Exported types
    WidgetAccessible(..)                    ,
    IsWidgetAccessible                      ,
    toWidgetAccessible                      ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#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 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

-- | Memory-managed wrapper type.
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

-- | Convert 'WidgetAccessible' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue WidgetAccessible where
    toGValue :: WidgetAccessible -> IO GValue
toGValue WidgetAccessible
o = do
        GType
gtype <- IO GType
c_gtk_widget_accessible_get_type
        WidgetAccessible
-> (Ptr WidgetAccessible -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WidgetAccessible
o (GType
-> (GValue -> Ptr WidgetAccessible -> IO ())
-> Ptr WidgetAccessible
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr WidgetAccessible -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO WidgetAccessible
fromGValue GValue
gv = do
        Ptr WidgetAccessible
ptr <- GValue -> IO (Ptr WidgetAccessible)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr WidgetAccessible)
        (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
        
    

-- | Type class for types which can be safely cast to `WidgetAccessible`, for instance with `toWidgetAccessible`.
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]

-- | Cast to `WidgetAccessible`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toWidgetAccessible :: (MonadIO m, IsWidgetAccessible o) => o -> m WidgetAccessible
toWidgetAccessible :: o -> m WidgetAccessible
toWidgetAccessible = IO WidgetAccessible -> m WidgetAccessible
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr WidgetAccessible -> WidgetAccessible
WidgetAccessible

#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.MethodInfo 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

#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