{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc) /No description available in the introspection data./ -} #define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \ && !defined(__HADDOCK_VERSION__)) module GI.WebKit2.Objects.PrintOperation ( -- * Exported types PrintOperation(..) , IsPrintOperation , toPrintOperation , noPrintOperation , -- * Methods -- ** getPageSetup #method:getPageSetup# #if ENABLE_OVERLOADING PrintOperationGetPageSetupMethodInfo , #endif printOperationGetPageSetup , -- ** getPrintSettings #method:getPrintSettings# #if ENABLE_OVERLOADING PrintOperationGetPrintSettingsMethodInfo, #endif printOperationGetPrintSettings , -- ** new #method:new# printOperationNew , -- ** print #method:print# #if ENABLE_OVERLOADING PrintOperationPrintMethodInfo , #endif printOperationPrint , -- ** runDialog #method:runDialog# #if ENABLE_OVERLOADING PrintOperationRunDialogMethodInfo , #endif printOperationRunDialog , -- ** setPageSetup #method:setPageSetup# #if ENABLE_OVERLOADING PrintOperationSetPageSetupMethodInfo , #endif printOperationSetPageSetup , -- ** setPrintSettings #method:setPrintSettings# #if ENABLE_OVERLOADING PrintOperationSetPrintSettingsMethodInfo, #endif printOperationSetPrintSettings , -- * Properties -- ** pageSetup #attr:pageSetup# {- | The initial 'GI.Gtk.Objects.PageSetup.PageSetup' for the print operation. -} #if ENABLE_OVERLOADING PrintOperationPageSetupPropertyInfo , #endif constructPrintOperationPageSetup , getPrintOperationPageSetup , #if ENABLE_OVERLOADING printOperationPageSetup , #endif setPrintOperationPageSetup , -- ** printSettings #attr:printSettings# {- | The initial 'GI.Gtk.Objects.PrintSettings.PrintSettings' for the print operation. -} #if ENABLE_OVERLOADING PrintOperationPrintSettingsPropertyInfo , #endif constructPrintOperationPrintSettings , getPrintOperationPrintSettings , #if ENABLE_OVERLOADING printOperationPrintSettings , #endif setPrintOperationPrintSettings , -- ** webView #attr:webView# {- | The 'GI.WebKit2.Objects.WebView.WebView' that will be printed. -} #if ENABLE_OVERLOADING PrintOperationWebViewPropertyInfo , #endif constructPrintOperationWebView , getPrintOperationWebView , #if ENABLE_OVERLOADING printOperationWebView , #endif -- * Signals -- ** createCustomWidget #signal:createCustomWidget# C_PrintOperationCreateCustomWidgetCallback, PrintOperationCreateCustomWidgetCallback, #if ENABLE_OVERLOADING PrintOperationCreateCustomWidgetSignalInfo, #endif afterPrintOperationCreateCustomWidget , genClosure_PrintOperationCreateCustomWidget, mk_PrintOperationCreateCustomWidgetCallback, noPrintOperationCreateCustomWidgetCallback, onPrintOperationCreateCustomWidget , wrap_PrintOperationCreateCustomWidgetCallback, -- ** failed #signal:failed# C_PrintOperationFailedCallback , PrintOperationFailedCallback , #if ENABLE_OVERLOADING PrintOperationFailedSignalInfo , #endif afterPrintOperationFailed , genClosure_PrintOperationFailed , mk_PrintOperationFailedCallback , noPrintOperationFailedCallback , onPrintOperationFailed , wrap_PrintOperationFailedCallback , -- ** finished #signal:finished# C_PrintOperationFinishedCallback , PrintOperationFinishedCallback , #if ENABLE_OVERLOADING PrintOperationFinishedSignalInfo , #endif afterPrintOperationFinished , genClosure_PrintOperationFinished , mk_PrintOperationFinishedCallback , noPrintOperationFinishedCallback , onPrintOperationFinished , wrap_PrintOperationFinishedCallback , ) 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.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.Window as Gtk.Window import {-# SOURCE #-} qualified GI.WebKit2.Enums as WebKit2.Enums import {-# SOURCE #-} qualified GI.WebKit2.Objects.PrintCustomWidget as WebKit2.PrintCustomWidget import {-# SOURCE #-} qualified GI.WebKit2.Objects.WebView as WebKit2.WebView -- | Memory-managed wrapper type. newtype PrintOperation = PrintOperation (ManagedPtr PrintOperation) foreign import ccall "webkit_print_operation_get_type" c_webkit_print_operation_get_type :: IO GType instance GObject PrintOperation where gobjectType = c_webkit_print_operation_get_type -- | Type class for types which can be safely cast to `PrintOperation`, for instance with `toPrintOperation`. class (GObject o, O.IsDescendantOf PrintOperation o) => IsPrintOperation o instance (GObject o, O.IsDescendantOf PrintOperation o) => IsPrintOperation o instance O.HasParentTypes PrintOperation type instance O.ParentTypes PrintOperation = '[GObject.Object.Object] -- | Cast to `PrintOperation`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`. toPrintOperation :: (MonadIO m, IsPrintOperation o) => o -> m PrintOperation toPrintOperation = liftIO . unsafeCastTo PrintOperation -- | A convenience alias for `Nothing` :: `Maybe` `PrintOperation`. noPrintOperation :: Maybe PrintOperation noPrintOperation = Nothing #if ENABLE_OVERLOADING type family ResolvePrintOperationMethod (t :: Symbol) (o :: *) :: * where ResolvePrintOperationMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolvePrintOperationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolvePrintOperationMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolvePrintOperationMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolvePrintOperationMethod "getv" o = GObject.Object.ObjectGetvMethodInfo ResolvePrintOperationMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolvePrintOperationMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolvePrintOperationMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolvePrintOperationMethod "print" o = PrintOperationPrintMethodInfo ResolvePrintOperationMethod "ref" o = GObject.Object.ObjectRefMethodInfo ResolvePrintOperationMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolvePrintOperationMethod "runDialog" o = PrintOperationRunDialogMethodInfo ResolvePrintOperationMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolvePrintOperationMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolvePrintOperationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolvePrintOperationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolvePrintOperationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolvePrintOperationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolvePrintOperationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolvePrintOperationMethod "getPageSetup" o = PrintOperationGetPageSetupMethodInfo ResolvePrintOperationMethod "getPrintSettings" o = PrintOperationGetPrintSettingsMethodInfo ResolvePrintOperationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolvePrintOperationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolvePrintOperationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolvePrintOperationMethod "setPageSetup" o = PrintOperationSetPageSetupMethodInfo ResolvePrintOperationMethod "setPrintSettings" o = PrintOperationSetPrintSettingsMethodInfo ResolvePrintOperationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolvePrintOperationMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolvePrintOperationMethod t PrintOperation, O.MethodInfo info PrintOperation p) => OL.IsLabel t (PrintOperation -> p) where #if MIN_VERSION_base(4,10,0) fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #else fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif #endif -- signal PrintOperation::create-custom-widget {- | Emitted when displaying the print dialog with 'GI.WebKit2.Objects.PrintOperation.printOperationRunDialog'. The returned 'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget' will be added to the print dialog and it will be owned by the /@printOperation@/. However, the object is guaranteed to be alive until the 'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget'::@/apply/@ is emitted. /Since: 2.16/ -} type PrintOperationCreateCustomWidgetCallback = IO WebKit2.PrintCustomWidget.PrintCustomWidget {- ^ __Returns:__ A 'GI.WebKit2.Objects.PrintCustomWidget.PrintCustomWidget' that will be embedded in the dialog. -} -- | A convenience synonym for @`Nothing` :: `Maybe` `PrintOperationCreateCustomWidgetCallback`@. noPrintOperationCreateCustomWidgetCallback :: Maybe PrintOperationCreateCustomWidgetCallback noPrintOperationCreateCustomWidgetCallback = Nothing -- | Type for the callback on the (unwrapped) C side. type C_PrintOperationCreateCustomWidgetCallback = Ptr () -> -- object Ptr () -> -- user_data IO (Ptr WebKit2.PrintCustomWidget.PrintCustomWidget) -- | Generate a function pointer callable from C code, from a `C_PrintOperationCreateCustomWidgetCallback`. foreign import ccall "wrapper" mk_PrintOperationCreateCustomWidgetCallback :: C_PrintOperationCreateCustomWidgetCallback -> IO (FunPtr C_PrintOperationCreateCustomWidgetCallback) -- | Wrap the callback into a `GClosure`. genClosure_PrintOperationCreateCustomWidget :: MonadIO m => PrintOperationCreateCustomWidgetCallback -> m (GClosure C_PrintOperationCreateCustomWidgetCallback) genClosure_PrintOperationCreateCustomWidget cb = liftIO $ do let cb' = wrap_PrintOperationCreateCustomWidgetCallback cb mk_PrintOperationCreateCustomWidgetCallback cb' >>= B.GClosure.newGClosure -- | Wrap a `PrintOperationCreateCustomWidgetCallback` into a `C_PrintOperationCreateCustomWidgetCallback`. wrap_PrintOperationCreateCustomWidgetCallback :: PrintOperationCreateCustomWidgetCallback -> C_PrintOperationCreateCustomWidgetCallback wrap_PrintOperationCreateCustomWidgetCallback _cb _ _ = do result <- _cb result' <- B.ManagedPtr.disownObject result return result' {- | Connect a signal handler for the “@create-custom-widget@” signal, to be run before the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.on' printOperation #createCustomWidget callback @ -} onPrintOperationCreateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId onPrintOperationCreateCustomWidget obj cb = liftIO $ do let cb' = wrap_PrintOperationCreateCustomWidgetCallback cb cb'' <- mk_PrintOperationCreateCustomWidgetCallback cb' connectSignalFunPtr obj "create-custom-widget" cb'' SignalConnectBefore {- | Connect a signal handler for the “@create-custom-widget@” signal, to be run after the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.after' printOperation #createCustomWidget callback @ -} afterPrintOperationCreateCustomWidget :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationCreateCustomWidgetCallback -> m SignalHandlerId afterPrintOperationCreateCustomWidget obj cb = liftIO $ do let cb' = wrap_PrintOperationCreateCustomWidgetCallback cb cb'' <- mk_PrintOperationCreateCustomWidgetCallback cb' connectSignalFunPtr obj "create-custom-widget" cb'' SignalConnectAfter -- signal PrintOperation::failed {- | Emitted when an error occurs while printing. The given /@error@/, of the domain @/WEBKIT_PRINT_ERROR/@, contains further details of the failure. The 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/finished/@ signal is emitted after this one. -} type PrintOperationFailedCallback = GError {- ^ /@error@/: the 'GError' that was triggered -} -> IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PrintOperationFailedCallback`@. noPrintOperationFailedCallback :: Maybe PrintOperationFailedCallback noPrintOperationFailedCallback = Nothing -- | Type for the callback on the (unwrapped) C side. type C_PrintOperationFailedCallback = Ptr () -> -- object Ptr GError -> Ptr () -> -- user_data IO () -- | Generate a function pointer callable from C code, from a `C_PrintOperationFailedCallback`. foreign import ccall "wrapper" mk_PrintOperationFailedCallback :: C_PrintOperationFailedCallback -> IO (FunPtr C_PrintOperationFailedCallback) -- | Wrap the callback into a `GClosure`. genClosure_PrintOperationFailed :: MonadIO m => PrintOperationFailedCallback -> m (GClosure C_PrintOperationFailedCallback) genClosure_PrintOperationFailed cb = liftIO $ do let cb' = wrap_PrintOperationFailedCallback cb mk_PrintOperationFailedCallback cb' >>= B.GClosure.newGClosure -- | Wrap a `PrintOperationFailedCallback` into a `C_PrintOperationFailedCallback`. wrap_PrintOperationFailedCallback :: PrintOperationFailedCallback -> C_PrintOperationFailedCallback wrap_PrintOperationFailedCallback _cb _ error_ _ = do error_' <- (newBoxed GError) error_ _cb error_' {- | Connect a signal handler for the “@failed@” signal, to be run before the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.on' printOperation #failed callback @ -} onPrintOperationFailed :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationFailedCallback -> m SignalHandlerId onPrintOperationFailed obj cb = liftIO $ do let cb' = wrap_PrintOperationFailedCallback cb cb'' <- mk_PrintOperationFailedCallback cb' connectSignalFunPtr obj "failed" cb'' SignalConnectBefore {- | Connect a signal handler for the “@failed@” signal, to be run after the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.after' printOperation #failed callback @ -} afterPrintOperationFailed :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationFailedCallback -> m SignalHandlerId afterPrintOperationFailed obj cb = liftIO $ do let cb' = wrap_PrintOperationFailedCallback cb cb'' <- mk_PrintOperationFailedCallback cb' connectSignalFunPtr obj "failed" cb'' SignalConnectAfter -- signal PrintOperation::finished {- | Emitted when the print operation has finished doing everything required for printing. -} type PrintOperationFinishedCallback = IO () -- | A convenience synonym for @`Nothing` :: `Maybe` `PrintOperationFinishedCallback`@. noPrintOperationFinishedCallback :: Maybe PrintOperationFinishedCallback noPrintOperationFinishedCallback = Nothing -- | Type for the callback on the (unwrapped) C side. type C_PrintOperationFinishedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () -- | Generate a function pointer callable from C code, from a `C_PrintOperationFinishedCallback`. foreign import ccall "wrapper" mk_PrintOperationFinishedCallback :: C_PrintOperationFinishedCallback -> IO (FunPtr C_PrintOperationFinishedCallback) -- | Wrap the callback into a `GClosure`. genClosure_PrintOperationFinished :: MonadIO m => PrintOperationFinishedCallback -> m (GClosure C_PrintOperationFinishedCallback) genClosure_PrintOperationFinished cb = liftIO $ do let cb' = wrap_PrintOperationFinishedCallback cb mk_PrintOperationFinishedCallback cb' >>= B.GClosure.newGClosure -- | Wrap a `PrintOperationFinishedCallback` into a `C_PrintOperationFinishedCallback`. wrap_PrintOperationFinishedCallback :: PrintOperationFinishedCallback -> C_PrintOperationFinishedCallback wrap_PrintOperationFinishedCallback _cb _ _ = do _cb {- | Connect a signal handler for the “@finished@” signal, to be run before the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.on' printOperation #finished callback @ -} onPrintOperationFinished :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationFinishedCallback -> m SignalHandlerId onPrintOperationFinished obj cb = liftIO $ do let cb' = wrap_PrintOperationFinishedCallback cb cb'' <- mk_PrintOperationFinishedCallback cb' connectSignalFunPtr obj "finished" cb'' SignalConnectBefore {- | Connect a signal handler for the “@finished@” signal, to be run after the default handler. When is enabled, this is equivalent to @ 'Data.GI.Base.Signals.after' printOperation #finished callback @ -} afterPrintOperationFinished :: (IsPrintOperation a, MonadIO m) => a -> PrintOperationFinishedCallback -> m SignalHandlerId afterPrintOperationFinished obj cb = liftIO $ do let cb' = wrap_PrintOperationFinishedCallback cb cb'' <- mk_PrintOperationFinishedCallback cb' connectSignalFunPtr obj "finished" cb'' SignalConnectAfter -- VVV Prop "page-setup" -- Type: TInterface (Name {namespace = "Gtk", name = "PageSetup"}) -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just True,Just False) {- | Get the value of the “@page-setup@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' printOperation #pageSetup @ -} getPrintOperationPageSetup :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Gtk.PageSetup.PageSetup) getPrintOperationPageSetup obj = liftIO $ B.Properties.getObjectPropertyObject obj "page-setup" Gtk.PageSetup.PageSetup {- | Set the value of the “@page-setup@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' printOperation [ #pageSetup 'Data.GI.Base.Attributes.:=' value ] @ -} setPrintOperationPageSetup :: (MonadIO m, IsPrintOperation o, Gtk.PageSetup.IsPageSetup a) => o -> a -> m () setPrintOperationPageSetup obj val = liftIO $ B.Properties.setObjectPropertyObject obj "page-setup" (Just val) {- | Construct a `GValueConstruct` with valid value for the “@page-setup@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructPrintOperationPageSetup :: (IsPrintOperation o, Gtk.PageSetup.IsPageSetup a) => a -> IO (GValueConstruct o) constructPrintOperationPageSetup val = B.Properties.constructObjectPropertyObject "page-setup" (Just val) #if ENABLE_OVERLOADING data PrintOperationPageSetupPropertyInfo instance AttrInfo PrintOperationPageSetupPropertyInfo where type AttrAllowedOps PrintOperationPageSetupPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint PrintOperationPageSetupPropertyInfo = Gtk.PageSetup.IsPageSetup type AttrBaseTypeConstraint PrintOperationPageSetupPropertyInfo = IsPrintOperation type AttrGetType PrintOperationPageSetupPropertyInfo = (Maybe Gtk.PageSetup.PageSetup) type AttrLabel PrintOperationPageSetupPropertyInfo = "page-setup" type AttrOrigin PrintOperationPageSetupPropertyInfo = PrintOperation attrGet _ = getPrintOperationPageSetup attrSet _ = setPrintOperationPageSetup attrConstruct _ = constructPrintOperationPageSetup attrClear _ = undefined #endif -- VVV Prop "print-settings" -- Type: TInterface (Name {namespace = "Gtk", name = "PrintSettings"}) -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just True,Just False) {- | Get the value of the “@print-settings@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' printOperation #printSettings @ -} getPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe Gtk.PrintSettings.PrintSettings) getPrintOperationPrintSettings obj = liftIO $ B.Properties.getObjectPropertyObject obj "print-settings" Gtk.PrintSettings.PrintSettings {- | Set the value of the “@print-settings@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.set' printOperation [ #printSettings 'Data.GI.Base.Attributes.:=' value ] @ -} setPrintOperationPrintSettings :: (MonadIO m, IsPrintOperation o, Gtk.PrintSettings.IsPrintSettings a) => o -> a -> m () setPrintOperationPrintSettings obj val = liftIO $ B.Properties.setObjectPropertyObject obj "print-settings" (Just val) {- | Construct a `GValueConstruct` with valid value for the “@print-settings@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructPrintOperationPrintSettings :: (IsPrintOperation o, Gtk.PrintSettings.IsPrintSettings a) => a -> IO (GValueConstruct o) constructPrintOperationPrintSettings val = B.Properties.constructObjectPropertyObject "print-settings" (Just val) #if ENABLE_OVERLOADING data PrintOperationPrintSettingsPropertyInfo instance AttrInfo PrintOperationPrintSettingsPropertyInfo where type AttrAllowedOps PrintOperationPrintSettingsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint PrintOperationPrintSettingsPropertyInfo = Gtk.PrintSettings.IsPrintSettings type AttrBaseTypeConstraint PrintOperationPrintSettingsPropertyInfo = IsPrintOperation type AttrGetType PrintOperationPrintSettingsPropertyInfo = (Maybe Gtk.PrintSettings.PrintSettings) type AttrLabel PrintOperationPrintSettingsPropertyInfo = "print-settings" type AttrOrigin PrintOperationPrintSettingsPropertyInfo = PrintOperation attrGet _ = getPrintOperationPrintSettings attrSet _ = setPrintOperationPrintSettings attrConstruct _ = constructPrintOperationPrintSettings attrClear _ = undefined #endif -- VVV Prop "web-view" -- Type: TInterface (Name {namespace = "WebKit2", name = "WebView"}) -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] -- Nullable: (Nothing,Nothing) {- | Get the value of the “@web-view@” property. When is enabled, this is equivalent to @ 'Data.GI.Base.Attributes.get' printOperation #webView @ -} getPrintOperationWebView :: (MonadIO m, IsPrintOperation o) => o -> m (Maybe WebKit2.WebView.WebView) getPrintOperationWebView obj = liftIO $ B.Properties.getObjectPropertyObject obj "web-view" WebKit2.WebView.WebView {- | Construct a `GValueConstruct` with valid value for the “@web-view@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`. -} constructPrintOperationWebView :: (IsPrintOperation o, WebKit2.WebView.IsWebView a) => a -> IO (GValueConstruct o) constructPrintOperationWebView val = B.Properties.constructObjectPropertyObject "web-view" (Just val) #if ENABLE_OVERLOADING data PrintOperationWebViewPropertyInfo instance AttrInfo PrintOperationWebViewPropertyInfo where type AttrAllowedOps PrintOperationWebViewPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear] type AttrSetTypeConstraint PrintOperationWebViewPropertyInfo = WebKit2.WebView.IsWebView type AttrBaseTypeConstraint PrintOperationWebViewPropertyInfo = IsPrintOperation type AttrGetType PrintOperationWebViewPropertyInfo = (Maybe WebKit2.WebView.WebView) type AttrLabel PrintOperationWebViewPropertyInfo = "web-view" type AttrOrigin PrintOperationWebViewPropertyInfo = PrintOperation attrGet _ = getPrintOperationWebView attrSet _ = undefined attrConstruct _ = constructPrintOperationWebView attrClear _ = undefined #endif #if ENABLE_OVERLOADING instance O.HasAttributeList PrintOperation type instance O.AttributeList PrintOperation = PrintOperationAttributeList type PrintOperationAttributeList = ('[ '("pageSetup", PrintOperationPageSetupPropertyInfo), '("printSettings", PrintOperationPrintSettingsPropertyInfo), '("webView", PrintOperationWebViewPropertyInfo)] :: [(Symbol, *)]) #endif #if ENABLE_OVERLOADING printOperationPageSetup :: AttrLabelProxy "pageSetup" printOperationPageSetup = AttrLabelProxy printOperationPrintSettings :: AttrLabelProxy "printSettings" printOperationPrintSettings = AttrLabelProxy printOperationWebView :: AttrLabelProxy "webView" printOperationWebView = AttrLabelProxy #endif #if ENABLE_OVERLOADING data PrintOperationCreateCustomWidgetSignalInfo instance SignalInfo PrintOperationCreateCustomWidgetSignalInfo where type HaskellCallbackType PrintOperationCreateCustomWidgetSignalInfo = PrintOperationCreateCustomWidgetCallback connectSignal _ obj cb connectMode = do let cb' = wrap_PrintOperationCreateCustomWidgetCallback cb cb'' <- mk_PrintOperationCreateCustomWidgetCallback cb' connectSignalFunPtr obj "create-custom-widget" cb'' connectMode data PrintOperationFailedSignalInfo instance SignalInfo PrintOperationFailedSignalInfo where type HaskellCallbackType PrintOperationFailedSignalInfo = PrintOperationFailedCallback connectSignal _ obj cb connectMode = do let cb' = wrap_PrintOperationFailedCallback cb cb'' <- mk_PrintOperationFailedCallback cb' connectSignalFunPtr obj "failed" cb'' connectMode data PrintOperationFinishedSignalInfo instance SignalInfo PrintOperationFinishedSignalInfo where type HaskellCallbackType PrintOperationFinishedSignalInfo = PrintOperationFinishedCallback connectSignal _ obj cb connectMode = do let cb' = wrap_PrintOperationFinishedCallback cb cb'' <- mk_PrintOperationFinishedCallback cb' connectSignalFunPtr obj "finished" cb'' connectMode type instance O.SignalList PrintOperation = PrintOperationSignalList type PrintOperationSignalList = ('[ '("createCustomWidget", PrintOperationCreateCustomWidgetSignalInfo), '("failed", PrintOperationFailedSignalInfo), '("finished", PrintOperationFinishedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)]) #endif -- method PrintOperation::new -- method type : Constructor -- Args : [Arg {argCName = "web_view", argType = TInterface (Name {namespace = "WebKit2", name = "WebView"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitWebView", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "WebKit2", name = "PrintOperation"})) -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_new" webkit_print_operation_new :: Ptr WebKit2.WebView.WebView -> -- web_view : TInterface (Name {namespace = "WebKit2", name = "WebView"}) IO (Ptr PrintOperation) {- | Create a new 'GI.WebKit2.Objects.PrintOperation.PrintOperation' to print /@webView@/ contents. -} printOperationNew :: (B.CallStack.HasCallStack, MonadIO m, WebKit2.WebView.IsWebView a) => a {- ^ /@webView@/: a 'GI.WebKit2.Objects.WebView.WebView' -} -> m PrintOperation {- ^ __Returns:__ a new 'GI.WebKit2.Objects.PrintOperation.PrintOperation'. -} printOperationNew webView = liftIO $ do webView' <- unsafeManagedPtrCastPtr webView result <- webkit_print_operation_new webView' checkUnexpectedReturnNULL "printOperationNew" result result' <- (wrapObject PrintOperation) result touchManagedPtr webView return result' #if ENABLE_OVERLOADING #endif -- method PrintOperation::get_page_setup -- method type : OrdinaryMethod -- Args : [Arg {argCName = "print_operation", argType = TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitPrintOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "PageSetup"})) -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_get_page_setup" webkit_print_operation_get_page_setup :: Ptr PrintOperation -> -- print_operation : TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}) IO (Ptr Gtk.PageSetup.PageSetup) {- | Return the current page setup of /@printOperation@/. It returns 'Nothing' until either 'GI.WebKit2.Objects.PrintOperation.printOperationSetPageSetup' or 'GI.WebKit2.Objects.PrintOperation.printOperationRunDialog' have been called. -} printOperationGetPageSetup :: (B.CallStack.HasCallStack, MonadIO m, IsPrintOperation a) => a {- ^ /@printOperation@/: a 'GI.WebKit2.Objects.PrintOperation.PrintOperation' -} -> m (Maybe Gtk.PageSetup.PageSetup) {- ^ __Returns:__ the current 'GI.Gtk.Objects.PageSetup.PageSetup' of /@printOperation@/. -} printOperationGetPageSetup printOperation = liftIO $ do printOperation' <- unsafeManagedPtrCastPtr printOperation result <- webkit_print_operation_get_page_setup printOperation' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Gtk.PageSetup.PageSetup) result' return result'' touchManagedPtr printOperation return maybeResult #if ENABLE_OVERLOADING data PrintOperationGetPageSetupMethodInfo instance (signature ~ (m (Maybe Gtk.PageSetup.PageSetup)), MonadIO m, IsPrintOperation a) => O.MethodInfo PrintOperationGetPageSetupMethodInfo a signature where overloadedMethod _ = printOperationGetPageSetup #endif -- method PrintOperation::get_print_settings -- method type : OrdinaryMethod -- Args : [Arg {argCName = "print_operation", argType = TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitPrintOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gtk", name = "PrintSettings"})) -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_get_print_settings" webkit_print_operation_get_print_settings :: Ptr PrintOperation -> -- print_operation : TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}) IO (Ptr Gtk.PrintSettings.PrintSettings) {- | Return the current print settings of /@printOperation@/. It returns 'Nothing' until either 'GI.WebKit2.Objects.PrintOperation.printOperationSetPrintSettings' or 'GI.WebKit2.Objects.PrintOperation.printOperationRunDialog' have been called. -} printOperationGetPrintSettings :: (B.CallStack.HasCallStack, MonadIO m, IsPrintOperation a) => a {- ^ /@printOperation@/: a 'GI.WebKit2.Objects.PrintOperation.PrintOperation' -} -> m (Maybe Gtk.PrintSettings.PrintSettings) {- ^ __Returns:__ the current 'GI.Gtk.Objects.PrintSettings.PrintSettings' of /@printOperation@/. -} printOperationGetPrintSettings printOperation = liftIO $ do printOperation' <- unsafeManagedPtrCastPtr printOperation result <- webkit_print_operation_get_print_settings printOperation' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Gtk.PrintSettings.PrintSettings) result' return result'' touchManagedPtr printOperation return maybeResult #if ENABLE_OVERLOADING data PrintOperationGetPrintSettingsMethodInfo instance (signature ~ (m (Maybe Gtk.PrintSettings.PrintSettings)), MonadIO m, IsPrintOperation a) => O.MethodInfo PrintOperationGetPrintSettingsMethodInfo a signature where overloadedMethod _ = printOperationGetPrintSettings #endif -- method PrintOperation::print -- method type : OrdinaryMethod -- Args : [Arg {argCName = "print_operation", argType = TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitPrintOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_print" webkit_print_operation_print :: Ptr PrintOperation -> -- print_operation : TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}) IO () {- | Start a print operation using current print settings and page setup without showing the print dialog. If either print settings or page setup are not set with 'GI.WebKit2.Objects.PrintOperation.printOperationSetPrintSettings' and 'GI.WebKit2.Objects.PrintOperation.printOperationSetPageSetup', the default options will be used and the print job will be sent to the default printer. The 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/finished/@ signal is emitted when the printing operation finishes. If an error occurs while printing the signal 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/failed/@ is emitted before 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/finished/@. -} printOperationPrint :: (B.CallStack.HasCallStack, MonadIO m, IsPrintOperation a) => a {- ^ /@printOperation@/: a 'GI.WebKit2.Objects.PrintOperation.PrintOperation' -} -> m () printOperationPrint printOperation = liftIO $ do printOperation' <- unsafeManagedPtrCastPtr printOperation webkit_print_operation_print printOperation' touchManagedPtr printOperation return () #if ENABLE_OVERLOADING data PrintOperationPrintMethodInfo instance (signature ~ (m ()), MonadIO m, IsPrintOperation a) => O.MethodInfo PrintOperationPrintMethodInfo a signature where overloadedMethod _ = printOperationPrint #endif -- method PrintOperation::run_dialog -- method type : OrdinaryMethod -- Args : [Arg {argCName = "print_operation", argType = TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitPrintOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "parent", argType = TInterface (Name {namespace = "Gtk", name = "Window"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "transient parent of the print dialog", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "WebKit2", name = "PrintOperationResponse"})) -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_run_dialog" webkit_print_operation_run_dialog :: Ptr PrintOperation -> -- print_operation : TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}) Ptr Gtk.Window.Window -> -- parent : TInterface (Name {namespace = "Gtk", name = "Window"}) IO CUInt {- | Run the print dialog and start printing using the options selected by the user. This method returns when the print dialog is closed. If the print dialog is cancelled 'GI.WebKit2.Enums.PrintOperationResponseCancel' is returned. If the user clicks on the print button, 'GI.WebKit2.Enums.PrintOperationResponsePrint' is returned and the print operation starts. In this case, the 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/finished/@ signal is emitted when the operation finishes. If an error occurs while printing, the signal 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/failed/@ is emitted before 'GI.WebKit2.Objects.PrintOperation.PrintOperation'::@/finished/@. If the print dialog is not cancelled current print settings and page setup of /@printOperation@/ are updated with options selected by the user when Print button is pressed in print dialog. You can get the updated print settings and page setup by calling 'GI.WebKit2.Objects.PrintOperation.printOperationGetPrintSettings' and 'GI.WebKit2.Objects.PrintOperation.printOperationGetPageSetup' after this method. -} printOperationRunDialog :: (B.CallStack.HasCallStack, MonadIO m, IsPrintOperation a, Gtk.Window.IsWindow b) => a {- ^ /@printOperation@/: a 'GI.WebKit2.Objects.PrintOperation.PrintOperation' -} -> Maybe (b) {- ^ /@parent@/: transient parent of the print dialog -} -> m WebKit2.Enums.PrintOperationResponse {- ^ __Returns:__ the 'GI.WebKit2.Enums.PrintOperationResponse' of the print dialog -} printOperationRunDialog printOperation parent = liftIO $ do printOperation' <- unsafeManagedPtrCastPtr printOperation maybeParent <- case parent of Nothing -> return nullPtr Just jParent -> do jParent' <- unsafeManagedPtrCastPtr jParent return jParent' result <- webkit_print_operation_run_dialog printOperation' maybeParent let result' = (toEnum . fromIntegral) result touchManagedPtr printOperation whenJust parent touchManagedPtr return result' #if ENABLE_OVERLOADING data PrintOperationRunDialogMethodInfo instance (signature ~ (Maybe (b) -> m WebKit2.Enums.PrintOperationResponse), MonadIO m, IsPrintOperation a, Gtk.Window.IsWindow b) => O.MethodInfo PrintOperationRunDialogMethodInfo a signature where overloadedMethod _ = printOperationRunDialog #endif -- method PrintOperation::set_page_setup -- method type : OrdinaryMethod -- Args : [Arg {argCName = "print_operation", argType = TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitPrintOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_setup", argType = TInterface (Name {namespace = "Gtk", name = "PageSetup"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkPageSetup to set", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_set_page_setup" webkit_print_operation_set_page_setup :: Ptr PrintOperation -> -- print_operation : TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}) Ptr Gtk.PageSetup.PageSetup -> -- page_setup : TInterface (Name {namespace = "Gtk", name = "PageSetup"}) IO () {- | Set the current page setup of /@printOperation@/. Current page setup is used for the initial values of the print dialog when 'GI.WebKit2.Objects.PrintOperation.printOperationRunDialog' is called. -} printOperationSetPageSetup :: (B.CallStack.HasCallStack, MonadIO m, IsPrintOperation a, Gtk.PageSetup.IsPageSetup b) => a {- ^ /@printOperation@/: a 'GI.WebKit2.Objects.PrintOperation.PrintOperation' -} -> b {- ^ /@pageSetup@/: a 'GI.Gtk.Objects.PageSetup.PageSetup' to set -} -> m () printOperationSetPageSetup printOperation pageSetup = liftIO $ do printOperation' <- unsafeManagedPtrCastPtr printOperation pageSetup' <- unsafeManagedPtrCastPtr pageSetup webkit_print_operation_set_page_setup printOperation' pageSetup' touchManagedPtr printOperation touchManagedPtr pageSetup return () #if ENABLE_OVERLOADING data PrintOperationSetPageSetupMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsPrintOperation a, Gtk.PageSetup.IsPageSetup b) => O.MethodInfo PrintOperationSetPageSetupMethodInfo a signature where overloadedMethod _ = printOperationSetPageSetup #endif -- method PrintOperation::set_print_settings -- method type : OrdinaryMethod -- Args : [Arg {argCName = "print_operation", argType = TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitPrintOperation", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "print_settings", argType = TInterface (Name {namespace = "Gtk", name = "PrintSettings"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkPrintSettings to set", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "webkit_print_operation_set_print_settings" webkit_print_operation_set_print_settings :: Ptr PrintOperation -> -- print_operation : TInterface (Name {namespace = "WebKit2", name = "PrintOperation"}) Ptr Gtk.PrintSettings.PrintSettings -> -- print_settings : TInterface (Name {namespace = "Gtk", name = "PrintSettings"}) IO () {- | Set the current print settings of /@printOperation@/. Current print settings are used for the initial values of the print dialog when 'GI.WebKit2.Objects.PrintOperation.printOperationRunDialog' is called. -} printOperationSetPrintSettings :: (B.CallStack.HasCallStack, MonadIO m, IsPrintOperation a, Gtk.PrintSettings.IsPrintSettings b) => a {- ^ /@printOperation@/: a 'GI.WebKit2.Objects.PrintOperation.PrintOperation' -} -> b {- ^ /@printSettings@/: a 'GI.Gtk.Objects.PrintSettings.PrintSettings' to set -} -> m () printOperationSetPrintSettings printOperation printSettings = liftIO $ do printOperation' <- unsafeManagedPtrCastPtr printOperation printSettings' <- unsafeManagedPtrCastPtr printSettings webkit_print_operation_set_print_settings printOperation' printSettings' touchManagedPtr printOperation touchManagedPtr printSettings return () #if ENABLE_OVERLOADING data PrintOperationSetPrintSettingsMethodInfo instance (signature ~ (b -> m ()), MonadIO m, IsPrintOperation a, Gtk.PrintSettings.IsPrintSettings b) => O.MethodInfo PrintOperationSetPrintSettingsMethodInfo a signature where overloadedMethod _ = printOperationSetPrintSettings #endif