{-# 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.WebKit2.Objects.PrintCustomWidget
    ( 

-- * Exported types
    PrintCustomWidget(..)                   ,
    IsPrintCustomWidget                     ,
    toPrintCustomWidget                     ,
    noPrintCustomWidget                     ,


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

#if defined(ENABLE_OVERLOADING)
    ResolvePrintCustomWidgetMethod          ,
#endif


-- ** getTitle #method:getTitle#

#if defined(ENABLE_OVERLOADING)
    PrintCustomWidgetGetTitleMethodInfo     ,
#endif
    printCustomWidgetGetTitle               ,


-- ** getWidget #method:getWidget#

#if defined(ENABLE_OVERLOADING)
    PrintCustomWidgetGetWidgetMethodInfo    ,
#endif
    printCustomWidgetGetWidget              ,


-- ** new #method:new#

    printCustomWidgetNew                    ,




 -- * Properties
-- ** title #attr:title#
-- | The title of the custom widget.
-- 
-- /Since: 2.16/

#if defined(ENABLE_OVERLOADING)
    PrintCustomWidgetTitlePropertyInfo      ,
#endif
    constructPrintCustomWidgetTitle         ,
    getPrintCustomWidgetTitle               ,
#if defined(ENABLE_OVERLOADING)
    printCustomWidgetTitle                  ,
#endif


-- ** widget #attr:widget#
-- | The custom t'GI.Gtk.Objects.Widget.Widget' that will be embedded in the dialog.
-- 
-- /Since: 2.16/

#if defined(ENABLE_OVERLOADING)
    PrintCustomWidgetWidgetPropertyInfo     ,
#endif
    constructPrintCustomWidgetWidget        ,
    getPrintCustomWidgetWidget              ,
#if defined(ENABLE_OVERLOADING)
    printCustomWidgetWidget                 ,
#endif




 -- * Signals
-- ** apply #signal:apply#

    C_PrintCustomWidgetApplyCallback        ,
    PrintCustomWidgetApplyCallback          ,
#if defined(ENABLE_OVERLOADING)
    PrintCustomWidgetApplySignalInfo        ,
#endif
    afterPrintCustomWidgetApply             ,
    genClosure_PrintCustomWidgetApply       ,
    mk_PrintCustomWidgetApplyCallback       ,
    noPrintCustomWidgetApplyCallback        ,
    onPrintCustomWidgetApply                ,
    wrap_PrintCustomWidgetApplyCallback     ,


-- ** update #signal:update#

    C_PrintCustomWidgetUpdateCallback       ,
    PrintCustomWidgetUpdateCallback         ,
#if defined(ENABLE_OVERLOADING)
    PrintCustomWidgetUpdateSignalInfo       ,
#endif
    afterPrintCustomWidgetUpdate            ,
    genClosure_PrintCustomWidgetUpdate      ,
    mk_PrintCustomWidgetUpdateCallback      ,
    noPrintCustomWidgetUpdateCallback       ,
    onPrintCustomWidgetUpdate               ,
    wrap_PrintCustomWidgetUpdateCallback    ,




    ) 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.ManagedPtr as B.ManagedPtr
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 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.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Objects.PageSetup as Gtk.PageSetup
import qualified GI.Gtk.Objects.PrintSettings as Gtk.PrintSettings
import qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- | Memory-managed wrapper type.
newtype PrintCustomWidget = PrintCustomWidget (ManagedPtr PrintCustomWidget)
    deriving (PrintCustomWidget -> PrintCustomWidget -> Bool
(PrintCustomWidget -> PrintCustomWidget -> Bool)
-> (PrintCustomWidget -> PrintCustomWidget -> Bool)
-> Eq PrintCustomWidget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrintCustomWidget -> PrintCustomWidget -> Bool
$c/= :: PrintCustomWidget -> PrintCustomWidget -> Bool
== :: PrintCustomWidget -> PrintCustomWidget -> Bool
$c== :: PrintCustomWidget -> PrintCustomWidget -> Bool
Eq)
foreign import ccall "webkit_print_custom_widget_get_type"
    c_webkit_print_custom_widget_get_type :: IO GType

instance GObject PrintCustomWidget where
    gobjectType :: IO GType
gobjectType = IO GType
c_webkit_print_custom_widget_get_type
    

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

-- | Type class for types which can be safely cast to `PrintCustomWidget`, for instance with `toPrintCustomWidget`.
class (GObject o, O.IsDescendantOf PrintCustomWidget o) => IsPrintCustomWidget o
instance (GObject o, O.IsDescendantOf PrintCustomWidget o) => IsPrintCustomWidget o

instance O.HasParentTypes PrintCustomWidget
type instance O.ParentTypes PrintCustomWidget = '[GObject.Object.Object]

-- | Cast to `PrintCustomWidget`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toPrintCustomWidget :: (MonadIO m, IsPrintCustomWidget o) => o -> m PrintCustomWidget
toPrintCustomWidget :: o -> m PrintCustomWidget
toPrintCustomWidget = IO PrintCustomWidget -> m PrintCustomWidget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintCustomWidget -> m PrintCustomWidget)
-> (o -> IO PrintCustomWidget) -> o -> m PrintCustomWidget
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PrintCustomWidget -> PrintCustomWidget)
-> o -> IO PrintCustomWidget
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr PrintCustomWidget -> PrintCustomWidget
PrintCustomWidget

-- | A convenience alias for `Nothing` :: `Maybe` `PrintCustomWidget`.
noPrintCustomWidget :: Maybe PrintCustomWidget
noPrintCustomWidget :: Maybe PrintCustomWidget
noPrintCustomWidget = Maybe PrintCustomWidget
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolvePrintCustomWidgetMethod (t :: Symbol) (o :: *) :: * where
    ResolvePrintCustomWidgetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolvePrintCustomWidgetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolvePrintCustomWidgetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolvePrintCustomWidgetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolvePrintCustomWidgetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolvePrintCustomWidgetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolvePrintCustomWidgetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolvePrintCustomWidgetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolvePrintCustomWidgetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolvePrintCustomWidgetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolvePrintCustomWidgetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolvePrintCustomWidgetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolvePrintCustomWidgetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolvePrintCustomWidgetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolvePrintCustomWidgetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolvePrintCustomWidgetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolvePrintCustomWidgetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolvePrintCustomWidgetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolvePrintCustomWidgetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolvePrintCustomWidgetMethod "getTitle" o = PrintCustomWidgetGetTitleMethodInfo
    ResolvePrintCustomWidgetMethod "getWidget" o = PrintCustomWidgetGetWidgetMethodInfo
    ResolvePrintCustomWidgetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolvePrintCustomWidgetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolvePrintCustomWidgetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolvePrintCustomWidgetMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolvePrintCustomWidgetMethod t PrintCustomWidget, O.MethodInfo info PrintCustomWidget p) => OL.IsLabel t (PrintCustomWidget -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

-- signal PrintCustomWidget::apply
-- | Emitted right before the printing will start. You should read the information
-- from the widget and update the content based on it if necessary. The widget
-- is not guaranteed to be valid at a later time.
-- 
-- /Since: 2.16/
type PrintCustomWidgetApplyCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `PrintCustomWidgetApplyCallback`@.
noPrintCustomWidgetApplyCallback :: Maybe PrintCustomWidgetApplyCallback
noPrintCustomWidgetApplyCallback :: Maybe (IO ())
noPrintCustomWidgetApplyCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_PrintCustomWidgetApplyCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_PrintCustomWidgetApplyCallback`.
foreign import ccall "wrapper"
    mk_PrintCustomWidgetApplyCallback :: C_PrintCustomWidgetApplyCallback -> IO (FunPtr C_PrintCustomWidgetApplyCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_PrintCustomWidgetApply :: MonadIO m => PrintCustomWidgetApplyCallback -> m (GClosure C_PrintCustomWidgetApplyCallback)
genClosure_PrintCustomWidgetApply :: IO () -> m (GClosure C_PrintCustomWidgetApplyCallback)
genClosure_PrintCustomWidgetApply cb :: IO ()
cb = IO (GClosure C_PrintCustomWidgetApplyCallback)
-> m (GClosure C_PrintCustomWidgetApplyCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PrintCustomWidgetApplyCallback)
 -> m (GClosure C_PrintCustomWidgetApplyCallback))
-> IO (GClosure C_PrintCustomWidgetApplyCallback)
-> m (GClosure C_PrintCustomWidgetApplyCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_PrintCustomWidgetApplyCallback
cb' = IO () -> C_PrintCustomWidgetApplyCallback
wrap_PrintCustomWidgetApplyCallback IO ()
cb
    C_PrintCustomWidgetApplyCallback
-> IO (FunPtr C_PrintCustomWidgetApplyCallback)
mk_PrintCustomWidgetApplyCallback C_PrintCustomWidgetApplyCallback
cb' IO (FunPtr C_PrintCustomWidgetApplyCallback)
-> (FunPtr C_PrintCustomWidgetApplyCallback
    -> IO (GClosure C_PrintCustomWidgetApplyCallback))
-> IO (GClosure C_PrintCustomWidgetApplyCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PrintCustomWidgetApplyCallback
-> IO (GClosure C_PrintCustomWidgetApplyCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `PrintCustomWidgetApplyCallback` into a `C_PrintCustomWidgetApplyCallback`.
wrap_PrintCustomWidgetApplyCallback ::
    PrintCustomWidgetApplyCallback ->
    C_PrintCustomWidgetApplyCallback
wrap_PrintCustomWidgetApplyCallback :: IO () -> C_PrintCustomWidgetApplyCallback
wrap_PrintCustomWidgetApplyCallback _cb :: IO ()
_cb _ _ = do
    IO ()
_cb 


-- | Connect a signal handler for the [apply](#signal:apply) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' printCustomWidget #apply callback
-- @
-- 
-- 
onPrintCustomWidgetApply :: (IsPrintCustomWidget a, MonadIO m) => a -> PrintCustomWidgetApplyCallback -> m SignalHandlerId
onPrintCustomWidgetApply :: a -> IO () -> m SignalHandlerId
onPrintCustomWidgetApply obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_PrintCustomWidgetApplyCallback
cb' = IO () -> C_PrintCustomWidgetApplyCallback
wrap_PrintCustomWidgetApplyCallback IO ()
cb
    FunPtr C_PrintCustomWidgetApplyCallback
cb'' <- C_PrintCustomWidgetApplyCallback
-> IO (FunPtr C_PrintCustomWidgetApplyCallback)
mk_PrintCustomWidgetApplyCallback C_PrintCustomWidgetApplyCallback
cb'
    a
-> Text
-> FunPtr C_PrintCustomWidgetApplyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "apply" FunPtr C_PrintCustomWidgetApplyCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [apply](#signal:apply) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' printCustomWidget #apply callback
-- @
-- 
-- 
afterPrintCustomWidgetApply :: (IsPrintCustomWidget a, MonadIO m) => a -> PrintCustomWidgetApplyCallback -> m SignalHandlerId
afterPrintCustomWidgetApply :: a -> IO () -> m SignalHandlerId
afterPrintCustomWidgetApply obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_PrintCustomWidgetApplyCallback
cb' = IO () -> C_PrintCustomWidgetApplyCallback
wrap_PrintCustomWidgetApplyCallback IO ()
cb
    FunPtr C_PrintCustomWidgetApplyCallback
cb'' <- C_PrintCustomWidgetApplyCallback
-> IO (FunPtr C_PrintCustomWidgetApplyCallback)
mk_PrintCustomWidgetApplyCallback C_PrintCustomWidgetApplyCallback
cb'
    a
-> Text
-> FunPtr C_PrintCustomWidgetApplyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "apply" FunPtr C_PrintCustomWidgetApplyCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data PrintCustomWidgetApplySignalInfo
instance SignalInfo PrintCustomWidgetApplySignalInfo where
    type HaskellCallbackType PrintCustomWidgetApplySignalInfo = PrintCustomWidgetApplyCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_PrintCustomWidgetApplyCallback cb
        cb'' <- mk_PrintCustomWidgetApplyCallback cb'
        connectSignalFunPtr obj "apply" cb'' connectMode detail

#endif

-- signal PrintCustomWidget::update
-- | Emitted after change of selected printer in the dialog. The actual page setup
-- and print settings are available and the custom widget can actualize itself
-- according to their values.
-- 
-- /Since: 2.16/
type PrintCustomWidgetUpdateCallback =
    Gtk.PageSetup.PageSetup
    -- ^ /@pageSetup@/: actual page setup
    -> Gtk.PrintSettings.PrintSettings
    -- ^ /@printSettings@/: actual print settings
    -> IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `PrintCustomWidgetUpdateCallback`@.
noPrintCustomWidgetUpdateCallback :: Maybe PrintCustomWidgetUpdateCallback
noPrintCustomWidgetUpdateCallback :: Maybe PrintCustomWidgetUpdateCallback
noPrintCustomWidgetUpdateCallback = Maybe PrintCustomWidgetUpdateCallback
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_PrintCustomWidgetUpdateCallback =
    Ptr () ->                               -- object
    Ptr Gtk.PageSetup.PageSetup ->
    Ptr Gtk.PrintSettings.PrintSettings ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_PrintCustomWidgetUpdateCallback`.
foreign import ccall "wrapper"
    mk_PrintCustomWidgetUpdateCallback :: C_PrintCustomWidgetUpdateCallback -> IO (FunPtr C_PrintCustomWidgetUpdateCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_PrintCustomWidgetUpdate :: MonadIO m => PrintCustomWidgetUpdateCallback -> m (GClosure C_PrintCustomWidgetUpdateCallback)
genClosure_PrintCustomWidgetUpdate :: PrintCustomWidgetUpdateCallback
-> m (GClosure C_PrintCustomWidgetUpdateCallback)
genClosure_PrintCustomWidgetUpdate cb :: PrintCustomWidgetUpdateCallback
cb = IO (GClosure C_PrintCustomWidgetUpdateCallback)
-> m (GClosure C_PrintCustomWidgetUpdateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_PrintCustomWidgetUpdateCallback)
 -> m (GClosure C_PrintCustomWidgetUpdateCallback))
-> IO (GClosure C_PrintCustomWidgetUpdateCallback)
-> m (GClosure C_PrintCustomWidgetUpdateCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_PrintCustomWidgetUpdateCallback
cb' = PrintCustomWidgetUpdateCallback
-> C_PrintCustomWidgetUpdateCallback
wrap_PrintCustomWidgetUpdateCallback PrintCustomWidgetUpdateCallback
cb
    C_PrintCustomWidgetUpdateCallback
-> IO (FunPtr C_PrintCustomWidgetUpdateCallback)
mk_PrintCustomWidgetUpdateCallback C_PrintCustomWidgetUpdateCallback
cb' IO (FunPtr C_PrintCustomWidgetUpdateCallback)
-> (FunPtr C_PrintCustomWidgetUpdateCallback
    -> IO (GClosure C_PrintCustomWidgetUpdateCallback))
-> IO (GClosure C_PrintCustomWidgetUpdateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_PrintCustomWidgetUpdateCallback
-> IO (GClosure C_PrintCustomWidgetUpdateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `PrintCustomWidgetUpdateCallback` into a `C_PrintCustomWidgetUpdateCallback`.
wrap_PrintCustomWidgetUpdateCallback ::
    PrintCustomWidgetUpdateCallback ->
    C_PrintCustomWidgetUpdateCallback
wrap_PrintCustomWidgetUpdateCallback :: PrintCustomWidgetUpdateCallback
-> C_PrintCustomWidgetUpdateCallback
wrap_PrintCustomWidgetUpdateCallback _cb :: PrintCustomWidgetUpdateCallback
_cb _ pageSetup :: Ptr PageSetup
pageSetup printSettings :: Ptr PrintSettings
printSettings _ = do
    PageSetup
pageSetup' <- ((ManagedPtr PageSetup -> PageSetup)
-> Ptr PageSetup -> IO PageSetup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PageSetup -> PageSetup
Gtk.PageSetup.PageSetup) Ptr PageSetup
pageSetup
    PrintSettings
printSettings' <- ((ManagedPtr PrintSettings -> PrintSettings)
-> Ptr PrintSettings -> IO PrintSettings
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr PrintSettings -> PrintSettings
Gtk.PrintSettings.PrintSettings) Ptr PrintSettings
printSettings
    PrintCustomWidgetUpdateCallback
_cb  PageSetup
pageSetup' PrintSettings
printSettings'


-- | Connect a signal handler for the [update](#signal:update) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' printCustomWidget #update callback
-- @
-- 
-- 
onPrintCustomWidgetUpdate :: (IsPrintCustomWidget a, MonadIO m) => a -> PrintCustomWidgetUpdateCallback -> m SignalHandlerId
onPrintCustomWidgetUpdate :: a -> PrintCustomWidgetUpdateCallback -> m SignalHandlerId
onPrintCustomWidgetUpdate obj :: a
obj cb :: PrintCustomWidgetUpdateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_PrintCustomWidgetUpdateCallback
cb' = PrintCustomWidgetUpdateCallback
-> C_PrintCustomWidgetUpdateCallback
wrap_PrintCustomWidgetUpdateCallback PrintCustomWidgetUpdateCallback
cb
    FunPtr C_PrintCustomWidgetUpdateCallback
cb'' <- C_PrintCustomWidgetUpdateCallback
-> IO (FunPtr C_PrintCustomWidgetUpdateCallback)
mk_PrintCustomWidgetUpdateCallback C_PrintCustomWidgetUpdateCallback
cb'
    a
-> Text
-> FunPtr C_PrintCustomWidgetUpdateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "update" FunPtr C_PrintCustomWidgetUpdateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [update](#signal:update) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' printCustomWidget #update callback
-- @
-- 
-- 
afterPrintCustomWidgetUpdate :: (IsPrintCustomWidget a, MonadIO m) => a -> PrintCustomWidgetUpdateCallback -> m SignalHandlerId
afterPrintCustomWidgetUpdate :: a -> PrintCustomWidgetUpdateCallback -> m SignalHandlerId
afterPrintCustomWidgetUpdate obj :: a
obj cb :: PrintCustomWidgetUpdateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_PrintCustomWidgetUpdateCallback
cb' = PrintCustomWidgetUpdateCallback
-> C_PrintCustomWidgetUpdateCallback
wrap_PrintCustomWidgetUpdateCallback PrintCustomWidgetUpdateCallback
cb
    FunPtr C_PrintCustomWidgetUpdateCallback
cb'' <- C_PrintCustomWidgetUpdateCallback
-> IO (FunPtr C_PrintCustomWidgetUpdateCallback)
mk_PrintCustomWidgetUpdateCallback C_PrintCustomWidgetUpdateCallback
cb'
    a
-> Text
-> FunPtr C_PrintCustomWidgetUpdateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "update" FunPtr C_PrintCustomWidgetUpdateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data PrintCustomWidgetUpdateSignalInfo
instance SignalInfo PrintCustomWidgetUpdateSignalInfo where
    type HaskellCallbackType PrintCustomWidgetUpdateSignalInfo = PrintCustomWidgetUpdateCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_PrintCustomWidgetUpdateCallback cb
        cb'' <- mk_PrintCustomWidgetUpdateCallback cb'
        connectSignalFunPtr obj "update" cb'' connectMode detail

#endif

-- VVV Prop "title"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@title@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' printCustomWidget #title
-- @
getPrintCustomWidgetTitle :: (MonadIO m, IsPrintCustomWidget o) => o -> m T.Text
getPrintCustomWidgetTitle :: o -> m Text
getPrintCustomWidgetTitle obj :: o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getPrintCustomWidgetTitle" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "title"

-- | Construct a `GValueConstruct` with valid value for the “@title@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructPrintCustomWidgetTitle :: (IsPrintCustomWidget o) => T.Text -> IO (GValueConstruct o)
constructPrintCustomWidgetTitle :: Text -> IO (GValueConstruct o)
constructPrintCustomWidgetTitle val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "title" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

#if defined(ENABLE_OVERLOADING)
data PrintCustomWidgetTitlePropertyInfo
instance AttrInfo PrintCustomWidgetTitlePropertyInfo where
    type AttrAllowedOps PrintCustomWidgetTitlePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint PrintCustomWidgetTitlePropertyInfo = IsPrintCustomWidget
    type AttrSetTypeConstraint PrintCustomWidgetTitlePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint PrintCustomWidgetTitlePropertyInfo = (~) T.Text
    type AttrTransferType PrintCustomWidgetTitlePropertyInfo = T.Text
    type AttrGetType PrintCustomWidgetTitlePropertyInfo = T.Text
    type AttrLabel PrintCustomWidgetTitlePropertyInfo = "title"
    type AttrOrigin PrintCustomWidgetTitlePropertyInfo = PrintCustomWidget
    attrGet = getPrintCustomWidgetTitle
    attrSet = undefined
    attrTransfer _ v = do
        return v
    attrConstruct = constructPrintCustomWidgetTitle
    attrClear = undefined
#endif

-- VVV Prop "widget"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Widget"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@widget@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' printCustomWidget #widget
-- @
getPrintCustomWidgetWidget :: (MonadIO m, IsPrintCustomWidget o) => o -> m (Maybe Gtk.Widget.Widget)
getPrintCustomWidgetWidget :: o -> m (Maybe Widget)
getPrintCustomWidgetWidget obj :: o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget

-- | Construct a `GValueConstruct` with valid value for the “@widget@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructPrintCustomWidgetWidget :: (IsPrintCustomWidget o, Gtk.Widget.IsWidget a) => a -> IO (GValueConstruct o)
constructPrintCustomWidgetWidget :: a -> IO (GValueConstruct o)
constructPrintCustomWidgetWidget val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "widget" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

#if defined(ENABLE_OVERLOADING)
data PrintCustomWidgetWidgetPropertyInfo
instance AttrInfo PrintCustomWidgetWidgetPropertyInfo where
    type AttrAllowedOps PrintCustomWidgetWidgetPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint PrintCustomWidgetWidgetPropertyInfo = IsPrintCustomWidget
    type AttrSetTypeConstraint PrintCustomWidgetWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferTypeConstraint PrintCustomWidgetWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferType PrintCustomWidgetWidgetPropertyInfo = Gtk.Widget.Widget
    type AttrGetType PrintCustomWidgetWidgetPropertyInfo = (Maybe Gtk.Widget.Widget)
    type AttrLabel PrintCustomWidgetWidgetPropertyInfo = "widget"
    type AttrOrigin PrintCustomWidgetWidgetPropertyInfo = PrintCustomWidget
    attrGet = getPrintCustomWidgetWidget
    attrSet = undefined
    attrTransfer _ v = do
        unsafeCastTo Gtk.Widget.Widget v
    attrConstruct = constructPrintCustomWidgetWidget
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PrintCustomWidget
type instance O.AttributeList PrintCustomWidget = PrintCustomWidgetAttributeList
type PrintCustomWidgetAttributeList = ('[ '("title", PrintCustomWidgetTitlePropertyInfo), '("widget", PrintCustomWidgetWidgetPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
printCustomWidgetTitle :: AttrLabelProxy "title"
printCustomWidgetTitle = AttrLabelProxy

printCustomWidgetWidget :: AttrLabelProxy "widget"
printCustomWidgetWidget = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PrintCustomWidget = PrintCustomWidgetSignalList
type PrintCustomWidgetSignalList = ('[ '("apply", PrintCustomWidgetApplySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("update", PrintCustomWidgetUpdateSignalInfo)] :: [(Symbol, *)])

#endif

-- method PrintCustomWidget::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkWidget" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "title"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a @widget's title" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "WebKit2" , name = "PrintCustomWidget" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_custom_widget_new" webkit_print_custom_widget_new :: 
    Ptr Gtk.Widget.Widget ->                -- widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- title : TBasicType TUTF8
    IO (Ptr PrintCustomWidget)

-- | Create a new t'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget' with given /@widget@/ and /@title@/. The /@widget@/
-- ownership is taken and it is destroyed together with the dialog even if this
-- object could still be alive at that point. You typically want to pass a container
-- widget with multiple widgets in it.
-- 
-- /Since: 2.16/
printCustomWidgetNew ::
    (B.CallStack.HasCallStack, MonadIO m, Gtk.Widget.IsWidget a) =>
    a
    -- ^ /@widget@/: a t'GI.Gtk.Objects.Widget.Widget'
    -> T.Text
    -- ^ /@title@/: a /@widget@/\'s title
    -> m PrintCustomWidget
    -- ^ __Returns:__ a new t'GI.WebKit2.Objects.PrintOperation.PrintOperation'.
printCustomWidgetNew :: a -> Text -> m PrintCustomWidget
printCustomWidgetNew widget :: a
widget title :: Text
title = IO PrintCustomWidget -> m PrintCustomWidget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PrintCustomWidget -> m PrintCustomWidget)
-> IO PrintCustomWidget -> m PrintCustomWidget
forall a b. (a -> b) -> a -> b
$ do
    Ptr Widget
widget' <- a -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
widget
    CString
title' <- Text -> IO CString
textToCString Text
title
    Ptr PrintCustomWidget
result <- Ptr Widget -> CString -> IO (Ptr PrintCustomWidget)
webkit_print_custom_widget_new Ptr Widget
widget' CString
title'
    Text -> Ptr PrintCustomWidget -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "printCustomWidgetNew" Ptr PrintCustomWidget
result
    PrintCustomWidget
result' <- ((ManagedPtr PrintCustomWidget -> PrintCustomWidget)
-> Ptr PrintCustomWidget -> IO PrintCustomWidget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PrintCustomWidget -> PrintCustomWidget
PrintCustomWidget) Ptr PrintCustomWidget
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
widget
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
title'
    PrintCustomWidget -> IO PrintCustomWidget
forall (m :: * -> *) a. Monad m => a -> m a
return PrintCustomWidget
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method PrintCustomWidget::get_title
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "print_custom_widget"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "PrintCustomWidget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitPrintCustomWidget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_custom_widget_get_title" webkit_print_custom_widget_get_title :: 
    Ptr PrintCustomWidget ->                -- print_custom_widget : TInterface (Name {namespace = "WebKit2", name = "PrintCustomWidget"})
    IO CString

-- | Return the value of t'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget':@/title/@ property for the given
-- /@printCustomWidget@/ object.
-- 
-- /Since: 2.16/
printCustomWidgetGetTitle ::
    (B.CallStack.HasCallStack, MonadIO m, IsPrintCustomWidget a) =>
    a
    -- ^ /@printCustomWidget@/: a t'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget'
    -> m T.Text
    -- ^ __Returns:__ Title of the /@printCustomWidget@/.
printCustomWidgetGetTitle :: a -> m Text
printCustomWidgetGetTitle printCustomWidget :: a
printCustomWidget = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr PrintCustomWidget
printCustomWidget' <- a -> IO (Ptr PrintCustomWidget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
printCustomWidget
    CString
result <- Ptr PrintCustomWidget -> IO CString
webkit_print_custom_widget_get_title Ptr PrintCustomWidget
printCustomWidget'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "printCustomWidgetGetTitle" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
printCustomWidget
    Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data PrintCustomWidgetGetTitleMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsPrintCustomWidget a) => O.MethodInfo PrintCustomWidgetGetTitleMethodInfo a signature where
    overloadedMethod = printCustomWidgetGetTitle

#endif

-- method PrintCustomWidget::get_widget
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "print_custom_widget"
--           , argType =
--               TInterface
--                 Name { namespace = "WebKit2" , name = "PrintCustomWidget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #WebKitPrintCustomWidget"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Widget" })
-- throws : False
-- Skip return : False

foreign import ccall "webkit_print_custom_widget_get_widget" webkit_print_custom_widget_get_widget :: 
    Ptr PrintCustomWidget ->                -- print_custom_widget : TInterface (Name {namespace = "WebKit2", name = "PrintCustomWidget"})
    IO (Ptr Gtk.Widget.Widget)

-- | Return the value of t'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget':@/widget/@ property for the given
-- /@printCustomWidget@/ object. The returned value will always be valid if called
-- from [apply]("GI.WebKit2.Objects.PrintCustomWidget#signal:apply") or [update]("GI.WebKit2.Objects.PrintCustomWidget#signal:update")
-- callbacks, but it will be 'P.Nothing' if called after the
-- [apply]("GI.WebKit2.Objects.PrintCustomWidget#signal:apply") signal is emitted.
-- 
-- /Since: 2.16/
printCustomWidgetGetWidget ::
    (B.CallStack.HasCallStack, MonadIO m, IsPrintCustomWidget a) =>
    a
    -- ^ /@printCustomWidget@/: a t'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget'
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ a t'GI.Gtk.Objects.Widget.Widget'.
printCustomWidgetGetWidget :: a -> m (Maybe Widget)
printCustomWidgetGetWidget printCustomWidget :: a
printCustomWidget = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr PrintCustomWidget
printCustomWidget' <- a -> IO (Ptr PrintCustomWidget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
printCustomWidget
    Ptr Widget
result <- Ptr PrintCustomWidget -> IO (Ptr Widget)
webkit_print_custom_widget_get_widget Ptr PrintCustomWidget
printCustomWidget'
    Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Widget
result' -> do
        Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
        Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
printCustomWidget
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data PrintCustomWidgetGetWidgetMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsPrintCustomWidget a) => O.MethodInfo PrintCustomWidgetGetWidgetMethodInfo a signature where
    overloadedMethod = printCustomWidgetGetWidget

#endif