{-# LANGUAGE TypeApplications #-}
#if !defined(__HADDOCK_VERSION__)
#define ENABLE_OVERLOADING
#endif
module GI.Atk.Interfaces.TableCell
(
TableCell(..) ,
IsTableCell ,
toTableCell ,
#if defined(ENABLE_OVERLOADING)
ResolveTableCellMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TableCellGetColumnHeaderCellsMethodInfo ,
#endif
tableCellGetColumnHeaderCells ,
#if defined(ENABLE_OVERLOADING)
TableCellGetColumnSpanMethodInfo ,
#endif
tableCellGetColumnSpan ,
#if defined(ENABLE_OVERLOADING)
TableCellGetPositionMethodInfo ,
#endif
tableCellGetPosition ,
#if defined(ENABLE_OVERLOADING)
TableCellGetRowColumnSpanMethodInfo ,
#endif
tableCellGetRowColumnSpan ,
#if defined(ENABLE_OVERLOADING)
TableCellGetRowHeaderCellsMethodInfo ,
#endif
tableCellGetRowHeaderCells ,
#if defined(ENABLE_OVERLOADING)
TableCellGetRowSpanMethodInfo ,
#endif
tableCellGetRowSpan ,
#if defined(ENABLE_OVERLOADING)
TableCellGetTableMethodInfo ,
#endif
tableCellGetTable ,
) 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 {-# SOURCE #-} qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.GObject.Objects.Object as GObject.Object
newtype TableCell = TableCell (SP.ManagedPtr TableCell)
deriving (TableCell -> TableCell -> Bool
(TableCell -> TableCell -> Bool)
-> (TableCell -> TableCell -> Bool) -> Eq TableCell
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TableCell -> TableCell -> Bool
$c/= :: TableCell -> TableCell -> Bool
== :: TableCell -> TableCell -> Bool
$c== :: TableCell -> TableCell -> Bool
Eq)
instance SP.ManagedPtrNewtype TableCell where
toManagedPtr :: TableCell -> ManagedPtr TableCell
toManagedPtr (TableCell p :: ManagedPtr TableCell
p) = ManagedPtr TableCell
p
foreign import ccall "atk_table_cell_get_type"
c_atk_table_cell_get_type :: IO B.Types.GType
instance B.Types.TypedObject TableCell where
glibType :: IO GType
glibType = IO GType
c_atk_table_cell_get_type
instance B.Types.GObject TableCell
instance B.GValue.IsGValue TableCell where
toGValue :: TableCell -> IO GValue
toGValue o :: TableCell
o = do
GType
gtype <- IO GType
c_atk_table_cell_get_type
TableCell -> (Ptr TableCell -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TableCell
o (GType
-> (GValue -> Ptr TableCell -> IO ()) -> Ptr TableCell -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr TableCell -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO TableCell
fromGValue gv :: GValue
gv = do
Ptr TableCell
ptr <- GValue -> IO (Ptr TableCell)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr TableCell)
(ManagedPtr TableCell -> TableCell)
-> Ptr TableCell -> IO TableCell
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr TableCell -> TableCell
TableCell Ptr TableCell
ptr
class (SP.GObject o, O.IsDescendantOf TableCell o) => IsTableCell o
instance (SP.GObject o, O.IsDescendantOf TableCell o) => IsTableCell o
instance O.HasParentTypes TableCell
type instance O.ParentTypes TableCell = '[Atk.Object.Object, GObject.Object.Object]
toTableCell :: (MonadIO m, IsTableCell o) => o -> m TableCell
toTableCell :: o -> m TableCell
toTableCell = IO TableCell -> m TableCell
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TableCell -> m TableCell)
-> (o -> IO TableCell) -> o -> m TableCell
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TableCell -> TableCell) -> o -> IO TableCell
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr TableCell -> TableCell
TableCell
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TableCell
type instance O.AttributeList TableCell = TableCellAttributeList
type TableCellAttributeList = ('[ '("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 family ResolveTableCellMethod (t :: Symbol) (o :: *) :: * where
ResolveTableCellMethod "addRelationship" o = Atk.Object.ObjectAddRelationshipMethodInfo
ResolveTableCellMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTableCellMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTableCellMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTableCellMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTableCellMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTableCellMethod "initialize" o = Atk.Object.ObjectInitializeMethodInfo
ResolveTableCellMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTableCellMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTableCellMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTableCellMethod "notifyStateChange" o = Atk.Object.ObjectNotifyStateChangeMethodInfo
ResolveTableCellMethod "peekParent" o = Atk.Object.ObjectPeekParentMethodInfo
ResolveTableCellMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTableCellMethod "refAccessibleChild" o = Atk.Object.ObjectRefAccessibleChildMethodInfo
ResolveTableCellMethod "refRelationSet" o = Atk.Object.ObjectRefRelationSetMethodInfo
ResolveTableCellMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTableCellMethod "refStateSet" o = Atk.Object.ObjectRefStateSetMethodInfo
ResolveTableCellMethod "removePropertyChangeHandler" o = Atk.Object.ObjectRemovePropertyChangeHandlerMethodInfo
ResolveTableCellMethod "removeRelationship" o = Atk.Object.ObjectRemoveRelationshipMethodInfo
ResolveTableCellMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTableCellMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTableCellMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTableCellMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTableCellMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTableCellMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTableCellMethod "getAccessibleId" o = Atk.Object.ObjectGetAccessibleIdMethodInfo
ResolveTableCellMethod "getAttributes" o = Atk.Object.ObjectGetAttributesMethodInfo
ResolveTableCellMethod "getColumnHeaderCells" o = TableCellGetColumnHeaderCellsMethodInfo
ResolveTableCellMethod "getColumnSpan" o = TableCellGetColumnSpanMethodInfo
ResolveTableCellMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTableCellMethod "getDescription" o = Atk.Object.ObjectGetDescriptionMethodInfo
ResolveTableCellMethod "getIndexInParent" o = Atk.Object.ObjectGetIndexInParentMethodInfo
ResolveTableCellMethod "getLayer" o = Atk.Object.ObjectGetLayerMethodInfo
ResolveTableCellMethod "getMdiZorder" o = Atk.Object.ObjectGetMdiZorderMethodInfo
ResolveTableCellMethod "getNAccessibleChildren" o = Atk.Object.ObjectGetNAccessibleChildrenMethodInfo
ResolveTableCellMethod "getName" o = Atk.Object.ObjectGetNameMethodInfo
ResolveTableCellMethod "getObjectLocale" o = Atk.Object.ObjectGetObjectLocaleMethodInfo
ResolveTableCellMethod "getParent" o = Atk.Object.ObjectGetParentMethodInfo
ResolveTableCellMethod "getPosition" o = TableCellGetPositionMethodInfo
ResolveTableCellMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTableCellMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTableCellMethod "getRole" o = Atk.Object.ObjectGetRoleMethodInfo
ResolveTableCellMethod "getRowColumnSpan" o = TableCellGetRowColumnSpanMethodInfo
ResolveTableCellMethod "getRowHeaderCells" o = TableCellGetRowHeaderCellsMethodInfo
ResolveTableCellMethod "getRowSpan" o = TableCellGetRowSpanMethodInfo
ResolveTableCellMethod "getTable" o = TableCellGetTableMethodInfo
ResolveTableCellMethod "setAccessibleId" o = Atk.Object.ObjectSetAccessibleIdMethodInfo
ResolveTableCellMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTableCellMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTableCellMethod "setDescription" o = Atk.Object.ObjectSetDescriptionMethodInfo
ResolveTableCellMethod "setName" o = Atk.Object.ObjectSetNameMethodInfo
ResolveTableCellMethod "setParent" o = Atk.Object.ObjectSetParentMethodInfo
ResolveTableCellMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTableCellMethod "setRole" o = Atk.Object.ObjectSetRoleMethodInfo
ResolveTableCellMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTableCellMethod t TableCell, O.MethodInfo info TableCell p) => OL.IsLabel t (TableCell -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "atk_table_cell_get_column_header_cells" atk_table_cell_get_column_header_cells ::
Ptr TableCell ->
IO (Ptr (GPtrArray (Ptr Atk.Object.Object)))
tableCellGetColumnHeaderCells ::
(B.CallStack.HasCallStack, MonadIO m, IsTableCell a) =>
a
-> m [Atk.Object.Object]
tableCellGetColumnHeaderCells :: a -> m [Object]
tableCellGetColumnHeaderCells cell :: a
cell = IO [Object] -> m [Object]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Object] -> m [Object]) -> IO [Object] -> m [Object]
forall a b. (a -> b) -> a -> b
$ do
Ptr TableCell
cell' <- a -> IO (Ptr TableCell)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
cell
Ptr (GPtrArray (Ptr Object))
result <- Ptr TableCell -> IO (Ptr (GPtrArray (Ptr Object)))
atk_table_cell_get_column_header_cells Ptr TableCell
cell'
Text -> Ptr (GPtrArray (Ptr Object)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "tableCellGetColumnHeaderCells" Ptr (GPtrArray (Ptr Object))
result
[Ptr Object]
result' <- Ptr (GPtrArray (Ptr Object)) -> IO [Ptr Object]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Object))
result
[Object]
result'' <- (Ptr Object -> IO Object) -> [Ptr Object] -> IO [Object]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Object -> Object
Atk.Object.Object) [Ptr Object]
result'
Ptr (GPtrArray (Ptr Object)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Object))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
cell
[Object] -> IO [Object]
forall (m :: * -> *) a. Monad m => a -> m a
return [Object]
result''
#if defined(ENABLE_OVERLOADING)
data TableCellGetColumnHeaderCellsMethodInfo
instance (signature ~ (m [Atk.Object.Object]), MonadIO m, IsTableCell a) => O.MethodInfo TableCellGetColumnHeaderCellsMethodInfo a signature where
overloadedMethod = tableCellGetColumnHeaderCells
#endif
foreign import ccall "atk_table_cell_get_column_span" atk_table_cell_get_column_span ::
Ptr TableCell ->
IO Int32
tableCellGetColumnSpan ::
(B.CallStack.HasCallStack, MonadIO m, IsTableCell a) =>
a
-> m Int32
tableCellGetColumnSpan :: a -> m Int32
tableCellGetColumnSpan cell :: a
cell = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TableCell
cell' <- a -> IO (Ptr TableCell)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
cell
Int32
result <- Ptr TableCell -> IO Int32
atk_table_cell_get_column_span Ptr TableCell
cell'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
cell
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TableCellGetColumnSpanMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsTableCell a) => O.MethodInfo TableCellGetColumnSpanMethodInfo a signature where
overloadedMethod = tableCellGetColumnSpan
#endif