module GI.Atk.Objects.Plug
(
Plug(..) ,
PlugK ,
toPlug ,
noPlug ,
plugGetId ,
plugNew ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Atk.Types
import GI.Atk.Callbacks
import qualified GI.GObject as GObject
newtype Plug = Plug (ForeignPtr Plug)
foreign import ccall "atk_plug_get_type"
c_atk_plug_get_type :: IO GType
type instance ParentTypes Plug = PlugParentTypes
type PlugParentTypes = '[Object, GObject.Object, Component]
instance GObject Plug where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_atk_plug_get_type
class GObject o => PlugK o
instance (GObject o, IsDescendantOf Plug o) => PlugK o
toPlug :: PlugK o => o -> IO Plug
toPlug = unsafeCastTo Plug
noPlug :: Maybe Plug
noPlug = Nothing
type instance AttributeList Plug = PlugAttributeList
type PlugAttributeList = ('[ '("accessible-component-layer", ObjectAccessibleComponentLayerPropertyInfo), '("accessible-component-mdi-zorder", ObjectAccessibleComponentMdiZorderPropertyInfo), '("accessible-description", ObjectAccessibleDescriptionPropertyInfo), '("accessible-hypertext-nlinks", ObjectAccessibleHypertextNlinksPropertyInfo), '("accessible-name", ObjectAccessibleNamePropertyInfo), '("accessible-parent", ObjectAccessibleParentPropertyInfo), '("accessible-role", ObjectAccessibleRolePropertyInfo), '("accessible-table-caption", ObjectAccessibleTableCaptionPropertyInfo), '("accessible-table-caption-object", ObjectAccessibleTableCaptionObjectPropertyInfo), '("accessible-table-column-description", ObjectAccessibleTableColumnDescriptionPropertyInfo), '("accessible-table-column-header", ObjectAccessibleTableColumnHeaderPropertyInfo), '("accessible-table-row-description", ObjectAccessibleTableRowDescriptionPropertyInfo), '("accessible-table-row-header", ObjectAccessibleTableRowHeaderPropertyInfo), '("accessible-table-summary", ObjectAccessibleTableSummaryPropertyInfo), '("accessible-value", ObjectAccessibleValuePropertyInfo)] :: [(Symbol, *)])
type instance SignalList Plug = PlugSignalList
type PlugSignalList = ('[ '("active-descendant-changed", ObjectActiveDescendantChangedSignalInfo), '("bounds-changed", ComponentBoundsChangedSignalInfo), '("children-changed", ObjectChildrenChangedSignalInfo), '("focus-event", ObjectFocusEventSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("property-change", ObjectPropertyChangeSignalInfo), '("state-change", ObjectStateChangeSignalInfo), '("visible-data-changed", ObjectVisibleDataChangedSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "atk_plug_new" atk_plug_new ::
IO (Ptr Plug)
plugNew ::
(MonadIO m) =>
m Plug
plugNew = liftIO $ do
result <- atk_plug_new
checkUnexpectedReturnNULL "atk_plug_new" result
result' <- (wrapObject Plug) result
return result'
foreign import ccall "atk_plug_get_id" atk_plug_get_id ::
Ptr Plug ->
IO CString
plugGetId ::
(MonadIO m, PlugK a) =>
a ->
m T.Text
plugGetId _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- atk_plug_get_id _obj'
checkUnexpectedReturnNULL "atk_plug_get_id" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'