gi-webkit2-4.0.29: WebKit2 bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2.Objects.PrintCustomWidget

Description

Allows to embed a custom widget in print dialog.

A WebKitPrintCustomWidget allows to embed a custom widget in the print dialog by connecting to the PrintOperation::createCustomWidget signal, creating a new WebKitPrintCustomWidget with printCustomWidgetNew and returning it from there. You can later use printOperationRunDialog to display the dialog.

Since: 2.16

Synopsis

Exported types

newtype PrintCustomWidget Source #

Memory-managed wrapper type.

Constructors

PrintCustomWidget (ManagedPtr PrintCustomWidget) 

Instances

Instances details
Eq PrintCustomWidget Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

GObject PrintCustomWidget Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

ManagedPtrNewtype PrintCustomWidget Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

TypedObject PrintCustomWidget Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

Methods

glibType :: IO GType

HasParentTypes PrintCustomWidget Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

IsGValue (Maybe PrintCustomWidget) Source #

Convert PrintCustomWidget to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe PrintCustomWidget -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe PrintCustomWidget)

type ParentTypes PrintCustomWidget Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

type ParentTypes PrintCustomWidget = '[Object]

class (GObject o, IsDescendantOf PrintCustomWidget o) => IsPrintCustomWidget o Source #

Type class for types which can be safely cast to PrintCustomWidget, for instance with toPrintCustomWidget.

Instances

Instances details
(GObject o, IsDescendantOf PrintCustomWidget o) => IsPrintCustomWidget o Source # 
Instance details

Defined in GI.WebKit2.Objects.PrintCustomWidget

toPrintCustomWidget :: (MonadIO m, IsPrintCustomWidget o) => o -> m PrintCustomWidget Source #

Cast to PrintCustomWidget, for types for which this is known to be safe. For general casts, use castTo.

Methods

getTitle

printCustomWidgetGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintCustomWidget a) 
=> a

printCustomWidget: a PrintCustomWidget

-> m Text

Returns: Title of the printCustomWidget.

Return the value of PrintCustomWidget:title property.

Return the value of PrintCustomWidget:title property for the given printCustomWidget object.

Since: 2.16

getWidget

printCustomWidgetGetWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsPrintCustomWidget a) 
=> a

printCustomWidget: a PrintCustomWidget

-> m (Maybe Widget)

Returns: a Widget.

Return the value of PrintCustomWidget:widget property.

Return the value of PrintCustomWidget:widget property for the given printCustomWidget object. The returned value will always be valid if called from PrintCustomWidget::apply or PrintCustomWidget::update callbacks, but it will be Nothing if called after the PrintCustomWidget::apply signal is emitted.

Since: 2.16

new

printCustomWidgetNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWidget a) 
=> a

widget: a Widget

-> Text

title: a widget's title

-> m PrintCustomWidget

Returns: a new PrintOperation.

Create a new 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

Properties

title

The title of the custom widget.

Since: 2.16

constructPrintCustomWidgetTitle :: (IsPrintCustomWidget o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “title” property. This is rarely needed directly, but it is used by new.

getPrintCustomWidgetTitle :: (MonadIO m, IsPrintCustomWidget o) => o -> m Text Source #

Get the value of the “title” property. When overloading is enabled, this is equivalent to

get printCustomWidget #title

widget

The custom Widget that will be embedded in the dialog.

Since: 2.16

constructPrintCustomWidgetWidget :: (IsPrintCustomWidget o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “widget” property. This is rarely needed directly, but it is used by new.

getPrintCustomWidgetWidget :: (MonadIO m, IsPrintCustomWidget o) => o -> m (Maybe Widget) Source #

Get the value of the “widget” property. When overloading is enabled, this is equivalent to

get printCustomWidget #widget

Signals

apply

type PrintCustomWidgetApplyCallback = IO () Source #

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

afterPrintCustomWidgetApply :: (IsPrintCustomWidget a, MonadIO m) => a -> ((?self :: a) => PrintCustomWidgetApplyCallback) -> m SignalHandlerId Source #

Connect a signal handler for the apply signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after printCustomWidget #apply callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onPrintCustomWidgetApply :: (IsPrintCustomWidget a, MonadIO m) => a -> ((?self :: a) => PrintCustomWidgetApplyCallback) -> m SignalHandlerId Source #

Connect a signal handler for the apply signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on printCustomWidget #apply callback

update

type PrintCustomWidgetUpdateCallback Source #

Arguments

 = PageSetup

pageSetup: actual page setup

-> PrintSettings

printSettings: actual print settings

-> IO () 

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

afterPrintCustomWidgetUpdate :: (IsPrintCustomWidget a, MonadIO m) => a -> ((?self :: a) => PrintCustomWidgetUpdateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the update signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after printCustomWidget #update callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onPrintCustomWidgetUpdate :: (IsPrintCustomWidget a, MonadIO m) => a -> ((?self :: a) => PrintCustomWidgetUpdateCallback) -> m SignalHandlerId Source #

Connect a signal handler for the update signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on printCustomWidget #update callback