{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.Gtk.Objects.Plug
    ( 

-- * Exported types
    Plug(..)                                ,
    PlugK                                   ,
    toPlug                                  ,
    noPlug                                  ,


 -- * Methods
-- ** plugConstruct
    plugConstruct                           ,


-- ** plugConstructForDisplay
    plugConstructForDisplay                 ,


-- ** plugGetEmbedded
    plugGetEmbedded                         ,


-- ** plugGetId
    plugGetId                               ,


-- ** plugGetSocketWindow
    plugGetSocketWindow                     ,


-- ** plugNew
    plugNew                                 ,


-- ** plugNewForDisplay
    plugNewForDisplay                       ,




 -- * Properties
-- ** Embedded
    PlugEmbeddedPropertyInfo                ,
    getPlugEmbedded                         ,


-- ** SocketWindow
    PlugSocketWindowPropertyInfo            ,
    getPlugSocketWindow                     ,




 -- * Signals
-- ** Embedded
    PlugEmbeddedCallback                    ,
    PlugEmbeddedCallbackC                   ,
    PlugEmbeddedSignalInfo                  ,
    afterPlugEmbedded                       ,
    mkPlugEmbeddedCallback                  ,
    noPlugEmbeddedCallback                  ,
    onPlugEmbedded                          ,
    plugEmbeddedCallbackWrapper             ,
    plugEmbeddedClosure                     ,




    ) 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.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.Atk as Atk
import qualified GI.GObject as GObject
import qualified GI.Gdk as Gdk

newtype Plug = Plug (ForeignPtr Plug)
foreign import ccall "gtk_plug_get_type"
    c_gtk_plug_get_type :: IO GType

type instance ParentTypes Plug = PlugParentTypes
type PlugParentTypes = '[Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable]

instance GObject Plug where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_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

-- signal Plug::embedded
type PlugEmbeddedCallback =
    IO ()

noPlugEmbeddedCallback :: Maybe PlugEmbeddedCallback
noPlugEmbeddedCallback = Nothing

type PlugEmbeddedCallbackC =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mkPlugEmbeddedCallback :: PlugEmbeddedCallbackC -> IO (FunPtr PlugEmbeddedCallbackC)

plugEmbeddedClosure :: PlugEmbeddedCallback -> IO Closure
plugEmbeddedClosure cb = newCClosure =<< mkPlugEmbeddedCallback wrapped
    where wrapped = plugEmbeddedCallbackWrapper cb

plugEmbeddedCallbackWrapper ::
    PlugEmbeddedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
plugEmbeddedCallbackWrapper _cb _ _ = do
    _cb 

onPlugEmbedded :: (GObject a, MonadIO m) => a -> PlugEmbeddedCallback -> m SignalHandlerId
onPlugEmbedded obj cb = liftIO $ connectPlugEmbedded obj cb SignalConnectBefore
afterPlugEmbedded :: (GObject a, MonadIO m) => a -> PlugEmbeddedCallback -> m SignalHandlerId
afterPlugEmbedded obj cb = connectPlugEmbedded obj cb SignalConnectAfter

connectPlugEmbedded :: (GObject a, MonadIO m) =>
                       a -> PlugEmbeddedCallback -> SignalConnectMode -> m SignalHandlerId
connectPlugEmbedded obj cb after = liftIO $ do
    cb' <- mkPlugEmbeddedCallback (plugEmbeddedCallbackWrapper cb)
    connectSignalFunPtr obj "embedded" cb' after

-- VVV Prop "embedded"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]

getPlugEmbedded :: (MonadIO m, PlugK o) => o -> m Bool
getPlugEmbedded obj = liftIO $ getObjectPropertyBool obj "embedded"

data PlugEmbeddedPropertyInfo
instance AttrInfo PlugEmbeddedPropertyInfo where
    type AttrAllowedOps PlugEmbeddedPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint PlugEmbeddedPropertyInfo = (~) ()
    type AttrBaseTypeConstraint PlugEmbeddedPropertyInfo = PlugK
    type AttrGetType PlugEmbeddedPropertyInfo = Bool
    type AttrLabel PlugEmbeddedPropertyInfo = "Plug::embedded"
    attrGet _ = getPlugEmbedded
    attrSet _ = undefined
    attrConstruct _ = undefined

-- VVV Prop "socket-window"
   -- Type: TInterface "Gdk" "Window"
   -- Flags: [PropertyReadable]

getPlugSocketWindow :: (MonadIO m, PlugK o) => o -> m Gdk.Window
getPlugSocketWindow obj = liftIO $ getObjectPropertyObject obj "socket-window" Gdk.Window

data PlugSocketWindowPropertyInfo
instance AttrInfo PlugSocketWindowPropertyInfo where
    type AttrAllowedOps PlugSocketWindowPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint PlugSocketWindowPropertyInfo = (~) ()
    type AttrBaseTypeConstraint PlugSocketWindowPropertyInfo = PlugK
    type AttrGetType PlugSocketWindowPropertyInfo = Gdk.Window
    type AttrLabel PlugSocketWindowPropertyInfo = "Plug::socket-window"
    attrGet _ = getPlugSocketWindow
    attrSet _ = undefined
    attrConstruct _ = undefined

type instance AttributeList Plug = PlugAttributeList
type PlugAttributeList = ('[ '("accept-focus", WindowAcceptFocusPropertyInfo), '("app-paintable", WidgetAppPaintablePropertyInfo), '("application", WindowApplicationPropertyInfo), '("attached-to", WindowAttachedToPropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("decorated", WindowDecoratedPropertyInfo), '("default-height", WindowDefaultHeightPropertyInfo), '("default-width", WindowDefaultWidthPropertyInfo), '("deletable", WindowDeletablePropertyInfo), '("destroy-with-parent", WindowDestroyWithParentPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("embedded", PlugEmbeddedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("focus-on-map", WindowFocusOnMapPropertyInfo), '("focus-visible", WindowFocusVisiblePropertyInfo), '("gravity", WindowGravityPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-resize-grip", WindowHasResizeGripPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("has-toplevel-focus", WindowHasToplevelFocusPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("hide-titlebar-when-maximized", WindowHideTitlebarWhenMaximizedPropertyInfo), '("icon", WindowIconPropertyInfo), '("icon-name", WindowIconNamePropertyInfo), '("is-active", WindowIsActivePropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("is-maximized", WindowIsMaximizedPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("mnemonics-visible", WindowMnemonicsVisiblePropertyInfo), '("modal", WindowModalPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resizable", WindowResizablePropertyInfo), '("resize-grip-visible", WindowResizeGripVisiblePropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("role", WindowRolePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("screen", WindowScreenPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("skip-pager-hint", WindowSkipPagerHintPropertyInfo), '("skip-taskbar-hint", WindowSkipTaskbarHintPropertyInfo), '("socket-window", PlugSocketWindowPropertyInfo), '("startup-id", WindowStartupIdPropertyInfo), '("style", WidgetStylePropertyInfo), '("title", WindowTitlePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("transient-for", WindowTransientForPropertyInfo), '("type", WindowTypePropertyInfo), '("type-hint", WindowTypeHintPropertyInfo), '("urgency-hint", WindowUrgencyHintPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo), '("window-position", WindowWindowPositionPropertyInfo)] :: [(Symbol, *)])

data PlugEmbeddedSignalInfo
instance SignalInfo PlugEmbeddedSignalInfo where
    type HaskellCallbackType PlugEmbeddedSignalInfo = PlugEmbeddedCallback
    connectSignal _ = connectPlugEmbedded

type instance SignalList Plug = PlugSignalList
type PlugSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("activate-default", WindowActivateDefaultSignalInfo), '("activate-focus", WindowActivateFocusSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("embedded", PlugEmbeddedSignalInfo), '("enable-debugging", WindowEnableDebuggingSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("keys-changed", WindowKeysChangedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("remove", ContainerRemoveSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus", WindowSetFocusSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method Plug::new
-- method type : Constructor
-- Args : [Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Plug"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_new" gtk_plug_new :: 
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO (Ptr Plug)


plugNew ::
    (MonadIO m) =>
    Word64 ->                               -- socket_id
    m Plug
plugNew socket_id = liftIO $ do
    result <- gtk_plug_new socket_id
    checkUnexpectedReturnNULL "gtk_plug_new" result
    result' <- (newObject Plug) result
    return result'

-- method Plug::new_for_display
-- method type : Constructor
-- Args : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Plug"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_new_for_display" gtk_plug_new_for_display :: 
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO (Ptr Plug)


plugNewForDisplay ::
    (MonadIO m, Gdk.DisplayK a) =>
    a ->                                    -- display
    Word64 ->                               -- socket_id
    m Plug
plugNewForDisplay display socket_id = liftIO $ do
    let display' = unsafeManagedPtrCastPtr display
    result <- gtk_plug_new_for_display display' socket_id
    checkUnexpectedReturnNULL "gtk_plug_new_for_display" result
    result' <- (newObject Plug) result
    touchManagedPtr display
    return result'

-- method Plug::construct
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_construct" gtk_plug_construct :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO ()


plugConstruct ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    Word64 ->                               -- socket_id
    m ()
plugConstruct _obj socket_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_plug_construct _obj' socket_id
    touchManagedPtr _obj
    return ()

-- method Plug::construct_for_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "display", argType = TInterface "Gdk" "Display", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "socket_id", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_construct_for_display" gtk_plug_construct_for_display :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    Ptr Gdk.Display ->                      -- display : TInterface "Gdk" "Display"
    Word64 ->                               -- socket_id : TBasicType TUInt64
    IO ()


plugConstructForDisplay ::
    (MonadIO m, PlugK a, Gdk.DisplayK b) =>
    a ->                                    -- _obj
    b ->                                    -- display
    Word64 ->                               -- socket_id
    m ()
plugConstructForDisplay _obj display socket_id = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    let display' = unsafeManagedPtrCastPtr display
    gtk_plug_construct_for_display _obj' display' socket_id
    touchManagedPtr _obj
    touchManagedPtr display
    return ()

-- method Plug::get_embedded
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_get_embedded" gtk_plug_get_embedded :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    IO CInt


plugGetEmbedded ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m Bool
plugGetEmbedded _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_plug_get_embedded _obj'
    let result' = (/= 0) result
    touchManagedPtr _obj
    return result'

-- method Plug::get_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_get_id" gtk_plug_get_id :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    IO Word64


plugGetId ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m Word64
plugGetId _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_plug_get_id _obj'
    touchManagedPtr _obj
    return result

-- method Plug::get_socket_window
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Plug", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gdk" "Window"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_plug_get_socket_window" gtk_plug_get_socket_window :: 
    Ptr Plug ->                             -- _obj : TInterface "Gtk" "Plug"
    IO (Ptr Gdk.Window)


plugGetSocketWindow ::
    (MonadIO m, PlugK a) =>
    a ->                                    -- _obj
    m Gdk.Window
plugGetSocketWindow _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_plug_get_socket_window _obj'
    checkUnexpectedReturnNULL "gtk_plug_get_socket_window" result
    result' <- (newObject Gdk.Window) result
    touchManagedPtr _obj
    return result'