gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.PrintSettings

Description

A GtkPrintSettings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you’ve printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn’t have to re-set all his settings.

Its also possible to enumerate the settings so that you can easily save the settings for the next time your app runs, or even store them in a document. The predefined keys try to use shared values as much as possible so that moving such a document between systems still works.

Printing support was added in GTK+ 2.10.

Synopsis

Exported types

newtype PrintSettings Source #

Memory-managed wrapper type.

Constructors

PrintSettings (ManagedPtr PrintSettings) 

Instances

Instances details
Eq PrintSettings Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

GObject PrintSettings Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

ManagedPtrNewtype PrintSettings Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

Methods

toManagedPtr :: PrintSettings -> ManagedPtr PrintSettings

TypedObject PrintSettings Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

Methods

glibType :: IO GType

HasParentTypes PrintSettings Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

IsGValue (Maybe PrintSettings) Source #

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

Instance details

Defined in GI.Gtk.Objects.PrintSettings

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes PrintSettings Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

type ParentTypes PrintSettings = '[Object]

class (GObject o, IsDescendantOf PrintSettings o) => IsPrintSettings o Source #

Type class for types which can be safely cast to PrintSettings, for instance with toPrintSettings.

Instances

Instances details
(GObject o, IsDescendantOf PrintSettings o) => IsPrintSettings o Source # 
Instance details

Defined in GI.Gtk.Objects.PrintSettings

toPrintSettings :: (MonadIO m, IsPrintSettings o) => o -> m PrintSettings Source #

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

Methods

copy

printSettingsCopy Source #

Arguments

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

other: a PrintSettings

-> m PrintSettings

Returns: a newly allocated copy of other

Copies a PrintSettings object.

Since: 2.10

foreach

printSettingsForeach Source #

Arguments

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

settings: a PrintSettings

-> PrintSettingsFunc

func: the function to call

-> m () 

Calls func for each key-value pair of settings.

Since: 2.10

get

printSettingsGet Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> m Text

Returns: the string value for key

Looks up the string value associated with key.

Since: 2.10

getBool

printSettingsGetBool Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> m Bool

Returns: True, if key maps to a true value.

Returns the boolean represented by the value that is associated with key.

The string “true” represents True, any other string False.

Since: 2.10

getCollate

printSettingsGetCollate Source #

Arguments

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

settings: a PrintSettings

-> m Bool

Returns: whether to collate the printed pages

Gets the value of PRINT_SETTINGS_COLLATE.

Since: 2.10

getDefaultSource

printSettingsGetDefaultSource Source #

Arguments

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

settings: a PrintSettings

-> m Text

Returns: the default source

Gets the value of PRINT_SETTINGS_DEFAULT_SOURCE.

Since: 2.10

getDither

printSettingsGetDither Source #

Arguments

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

settings: a PrintSettings

-> m Text

Returns: the dithering that is used

Gets the value of PRINT_SETTINGS_DITHER.

Since: 2.10

getDouble

printSettingsGetDouble Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> m Double

Returns: the double value of key

Returns the double value associated with key, or 0.

Since: 2.10

getDoubleWithDefault

printSettingsGetDoubleWithDefault Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Double

def: the default value

-> m Double

Returns: the floating point number associated with key

Returns the floating point number represented by the value that is associated with key, or defaultVal if the value does not represent a floating point number.

Floating point numbers are parsed with asciiStrtod.

Since: 2.10

getDuplex

printSettingsGetDuplex Source #

Arguments

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

settings: a PrintSettings

-> m PrintDuplex

Returns: whether to print the output in duplex.

Gets the value of PRINT_SETTINGS_DUPLEX.

Since: 2.10

getFinishings

printSettingsGetFinishings Source #

Arguments

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

settings: a PrintSettings

-> m Text

Returns: the finishings

Gets the value of PRINT_SETTINGS_FINISHINGS.

Since: 2.10

getInt

printSettingsGetInt Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> m Int32

Returns: the integer value of key

Returns the integer value of key, or 0.

Since: 2.10

getIntWithDefault

printSettingsGetIntWithDefault Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Int32

def: the default value

-> m Int32

Returns: the integer value of key

Returns the value of key, interpreted as an integer, or the default value.

Since: 2.10

getLength

printSettingsGetLength Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Unit

unit: the unit of the return value

-> m Double

Returns: the length value of key, converted to unit

Returns the value associated with key, interpreted as a length. The returned value is converted to units.

Since: 2.10

getMediaType

printSettingsGetMediaType Source #

Arguments

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

settings: a PrintSettings

-> m Text

Returns: the media type

Gets the value of PRINT_SETTINGS_MEDIA_TYPE.

The set of media types is defined in PWG 5101.1-2002 PWG.

Since: 2.10

getNCopies

printSettingsGetNCopies Source #

Arguments

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

settings: a PrintSettings

-> m Int32

Returns: the number of copies to print

Gets the value of PRINT_SETTINGS_N_COPIES.

Since: 2.10

getNumberUp

printSettingsGetNumberUp Source #

Arguments

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

settings: a PrintSettings

-> m Int32

Returns: the number of pages per sheet

Gets the value of PRINT_SETTINGS_NUMBER_UP.

Since: 2.10

getNumberUpLayout

printSettingsGetNumberUpLayout Source #

Arguments

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

settings: a PrintSettings

-> m NumberUpLayout

Returns: layout of page in number-up mode

Gets the value of PRINT_SETTINGS_NUMBER_UP_LAYOUT.

Since: 2.14

getOrientation

printSettingsGetOrientation Source #

Arguments

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

settings: a PrintSettings

-> m PageOrientation

Returns: the orientation

Get the value of PRINT_SETTINGS_ORIENTATION, converted to a PageOrientation.

Since: 2.10

getOutputBin

printSettingsGetOutputBin Source #

Arguments

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

settings: a PrintSettings

-> m Text

Returns: the output bin

Gets the value of PRINT_SETTINGS_OUTPUT_BIN.

Since: 2.10

getPageRanges

printSettingsGetPageRanges Source #

Arguments

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

settings: a PrintSettings

-> m [PageRange]

Returns: an array of GtkPageRanges. Use free to free the array when it is no longer needed.

Gets the value of PRINT_SETTINGS_PAGE_RANGES.

Since: 2.10

getPageSet

printSettingsGetPageSet Source #

Arguments

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

settings: a PrintSettings

-> m PageSet

Returns: the set of pages to print

Gets the value of PRINT_SETTINGS_PAGE_SET.

Since: 2.10

getPaperHeight

printSettingsGetPaperHeight Source #

Arguments

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

settings: a PrintSettings

-> Unit

unit: the unit for the return value

-> m Double

Returns: the paper height, in units of unit

Gets the value of PRINT_SETTINGS_PAPER_HEIGHT, converted to unit.

Since: 2.10

getPaperSize

printSettingsGetPaperSize Source #

Arguments

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

settings: a PrintSettings

-> m PaperSize

Returns: the paper size

Gets the value of PRINT_SETTINGS_PAPER_FORMAT, converted to a PaperSize.

Since: 2.10

getPaperWidth

printSettingsGetPaperWidth Source #

Arguments

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

settings: a PrintSettings

-> Unit

unit: the unit for the return value

-> m Double

Returns: the paper width, in units of unit

Gets the value of PRINT_SETTINGS_PAPER_WIDTH, converted to unit.

Since: 2.10

getPrintPages

printSettingsGetPrintPages Source #

Arguments

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

settings: a PrintSettings

-> m PrintPages

Returns: which pages to print

Gets the value of PRINT_SETTINGS_PRINT_PAGES.

Since: 2.10

getPrinter

printSettingsGetPrinter Source #

Arguments

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

settings: a PrintSettings

-> m Text

Returns: the printer name

Convenience function to obtain the value of PRINT_SETTINGS_PRINTER.

Since: 2.10

getPrinterLpi

printSettingsGetPrinterLpi Source #

Arguments

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

settings: a PrintSettings

-> m Double

Returns: the resolution in lpi (lines per inch)

Gets the value of PRINT_SETTINGS_PRINTER_LPI.

Since: 2.16

getQuality

printSettingsGetQuality Source #

Arguments

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

settings: a PrintSettings

-> m PrintQuality

Returns: the print quality

Gets the value of PRINT_SETTINGS_QUALITY.

Since: 2.10

getResolution

printSettingsGetResolution Source #

Arguments

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

settings: a PrintSettings

-> m Int32

Returns: the resolution in dpi

Gets the value of PRINT_SETTINGS_RESOLUTION.

Since: 2.10

getResolutionX

printSettingsGetResolutionX Source #

Arguments

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

settings: a PrintSettings

-> m Int32

Returns: the horizontal resolution in dpi

Gets the value of PRINT_SETTINGS_RESOLUTION_X.

Since: 2.16

getResolutionY

printSettingsGetResolutionY Source #

Arguments

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

settings: a PrintSettings

-> m Int32

Returns: the vertical resolution in dpi

Gets the value of PRINT_SETTINGS_RESOLUTION_Y.

Since: 2.16

getReverse

printSettingsGetReverse Source #

Arguments

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

settings: a PrintSettings

-> m Bool

Returns: whether to reverse the order of the printed pages

Gets the value of PRINT_SETTINGS_REVERSE.

Since: 2.10

getScale

printSettingsGetScale Source #

Arguments

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

settings: a PrintSettings

-> m Double

Returns: the scale in percent

Gets the value of PRINT_SETTINGS_SCALE.

Since: 2.10

getUseColor

printSettingsGetUseColor Source #

Arguments

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

settings: a PrintSettings

-> m Bool

Returns: whether to use color

Gets the value of PRINT_SETTINGS_USE_COLOR.

Since: 2.10

hasKey

printSettingsHasKey Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> m Bool

Returns: True, if key has a value

Returns True, if a value is associated with key.

Since: 2.10

loadFile

printSettingsLoadFile Source #

Arguments

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

settings: a PrintSettings

-> [Char]

fileName: the filename to read the settings from

-> m ()

(Can throw GError)

Reads the print settings from fileName. If the file could not be loaded then error is set to either a FileError or KeyFileError. See printSettingsToFile.

Since: 2.14

loadKeyFile

printSettingsLoadKeyFile Source #

Arguments

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

settings: a PrintSettings

-> KeyFile

keyFile: the KeyFile to retrieve the settings from

-> Maybe Text

groupName: the name of the group to use, or Nothing to use the default “Print Settings”

-> m ()

(Can throw GError)

Reads the print settings from the group groupName in keyFile. If the file could not be loaded then error is set to either a FileError or KeyFileError.

Since: 2.14

new

printSettingsNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m PrintSettings

Returns: a new PrintSettings object

Creates a new PrintSettings object.

Since: 2.10

newFromFile

printSettingsNewFromFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Char]

fileName: the filename to read the settings from

-> m PrintSettings

Returns: the restored PrintSettings (Can throw GError)

Reads the print settings from fileName. Returns a new PrintSettings object with the restored settings, or Nothing if an error occurred. If the file could not be loaded then error is set to either a FileError or KeyFileError. See printSettingsToFile.

Since: 2.12

newFromGvariant

printSettingsNewFromGvariant Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GVariant

variant: an a{sv} GVariant

-> m PrintSettings

Returns: a new PrintSettings object

Deserialize print settings from an a{sv} variant in the format produced by printSettingsToGvariant.

Since: 3.22

newFromKeyFile

printSettingsNewFromKeyFile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> KeyFile

keyFile: the KeyFile to retrieve the settings from

-> Maybe Text

groupName: the name of the group to use, or Nothing to use the default “Print Settings”

-> m PrintSettings

Returns: the restored PrintSettings (Can throw GError)

Reads the print settings from the group groupName in keyFile. Returns a new PrintSettings object with the restored settings, or Nothing if an error occurred. If the file could not be loaded then error is set to either a FileError or KeyFileError.

Since: 2.12

set

printSettingsSet Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Maybe Text

value: a string value, or Nothing

-> m () 

Associates value with key.

Since: 2.10

setBool

printSettingsSetBool Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Bool

value: a boolean

-> m () 

Sets key to a boolean value.

Since: 2.10

setCollate

printSettingsSetCollate Source #

Arguments

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

settings: a PrintSettings

-> Bool

collate: whether to collate the output

-> m () 

Sets the value of PRINT_SETTINGS_COLLATE.

Since: 2.10

setDefaultSource

printSettingsSetDefaultSource Source #

Arguments

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

settings: a PrintSettings

-> Text

defaultSource: the default source

-> m () 

Sets the value of PRINT_SETTINGS_DEFAULT_SOURCE.

Since: 2.10

setDither

printSettingsSetDither Source #

Arguments

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

settings: a PrintSettings

-> Text

dither: the dithering that is used

-> m () 

Sets the value of PRINT_SETTINGS_DITHER.

Since: 2.10

setDouble

printSettingsSetDouble Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Double

value: a double value

-> m () 

Sets key to a double value.

Since: 2.10

setDuplex

printSettingsSetDuplex Source #

Arguments

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

settings: a PrintSettings

-> PrintDuplex

duplex: a PrintDuplex value

-> m () 

Sets the value of PRINT_SETTINGS_DUPLEX.

Since: 2.10

setFinishings

printSettingsSetFinishings Source #

Arguments

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

settings: a PrintSettings

-> Text

finishings: the finishings

-> m () 

Sets the value of PRINT_SETTINGS_FINISHINGS.

Since: 2.10

setInt

printSettingsSetInt Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Int32

value: an integer

-> m () 

Sets key to an integer value.

Since: 2.10

setLength

printSettingsSetLength Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> Double

value: a length

-> Unit

unit: the unit of length

-> m () 

Associates a length in units of unit with key.

Since: 2.10

setMediaType

printSettingsSetMediaType Source #

Arguments

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

settings: a PrintSettings

-> Text

mediaType: the media type

-> m () 

Sets the value of PRINT_SETTINGS_MEDIA_TYPE.

The set of media types is defined in PWG 5101.1-2002 PWG.

Since: 2.10

setNCopies

printSettingsSetNCopies Source #

Arguments

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

settings: a PrintSettings

-> Int32

numCopies: the number of copies

-> m () 

Sets the value of PRINT_SETTINGS_N_COPIES.

Since: 2.10

setNumberUp

printSettingsSetNumberUp Source #

Arguments

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

settings: a PrintSettings

-> Int32

numberUp: the number of pages per sheet

-> m () 

Sets the value of PRINT_SETTINGS_NUMBER_UP.

Since: 2.10

setNumberUpLayout

printSettingsSetNumberUpLayout Source #

Arguments

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

settings: a PrintSettings

-> NumberUpLayout

numberUpLayout: a NumberUpLayout value

-> m () 

Sets the value of PRINT_SETTINGS_NUMBER_UP_LAYOUT.

Since: 2.14

setOrientation

printSettingsSetOrientation Source #

Arguments

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

settings: a PrintSettings

-> PageOrientation

orientation: a page orientation

-> m () 

Sets the value of PRINT_SETTINGS_ORIENTATION.

Since: 2.10

setOutputBin

printSettingsSetOutputBin Source #

Arguments

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

settings: a PrintSettings

-> Text

outputBin: the output bin

-> m () 

Sets the value of PRINT_SETTINGS_OUTPUT_BIN.

Since: 2.10

setPageRanges

printSettingsSetPageRanges Source #

Arguments

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

settings: a PrintSettings

-> [PageRange]

pageRanges: an array of GtkPageRanges

-> m () 

Sets the value of PRINT_SETTINGS_PAGE_RANGES.

Since: 2.10

setPageSet

printSettingsSetPageSet Source #

Arguments

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

settings: a PrintSettings

-> PageSet

pageSet: a PageSet value

-> m () 

Sets the value of PRINT_SETTINGS_PAGE_SET.

Since: 2.10

setPaperHeight

printSettingsSetPaperHeight Source #

Arguments

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

settings: a PrintSettings

-> Double

height: the paper height

-> Unit

unit: the units of height

-> m () 

Sets the value of PRINT_SETTINGS_PAPER_HEIGHT.

Since: 2.10

setPaperSize

printSettingsSetPaperSize Source #

Arguments

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

settings: a PrintSettings

-> PaperSize

paperSize: a paper size

-> m () 

setPaperWidth

printSettingsSetPaperWidth Source #

Arguments

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

settings: a PrintSettings

-> Double

width: the paper width

-> Unit

unit: the units of width

-> m () 

Sets the value of PRINT_SETTINGS_PAPER_WIDTH.

Since: 2.10

setPrintPages

printSettingsSetPrintPages Source #

Arguments

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

settings: a PrintSettings

-> PrintPages

pages: a PrintPages value

-> m () 

Sets the value of PRINT_SETTINGS_PRINT_PAGES.

Since: 2.10

setPrinter

printSettingsSetPrinter Source #

Arguments

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

settings: a PrintSettings

-> Text

printer: the printer name

-> m () 

Convenience function to set PRINT_SETTINGS_PRINTER to printer.

Since: 2.10

setPrinterLpi

printSettingsSetPrinterLpi Source #

Arguments

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

settings: a PrintSettings

-> Double

lpi: the resolution in lpi (lines per inch)

-> m () 

Sets the value of PRINT_SETTINGS_PRINTER_LPI.

Since: 2.16

setQuality

printSettingsSetQuality Source #

Arguments

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

settings: a PrintSettings

-> PrintQuality

quality: a PrintQuality value

-> m () 

Sets the value of PRINT_SETTINGS_QUALITY.

Since: 2.10

setResolution

printSettingsSetResolution Source #

Arguments

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

settings: a PrintSettings

-> Int32

resolution: the resolution in dpi

-> m () 

setResolutionXy

printSettingsSetResolutionXy Source #

Arguments

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

settings: a PrintSettings

-> Int32

resolutionX: the horizontal resolution in dpi

-> Int32

resolutionY: the vertical resolution in dpi

-> m () 

setReverse

printSettingsSetReverse Source #

Arguments

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

settings: a PrintSettings

-> Bool

reverse: whether to reverse the output

-> m () 

Sets the value of PRINT_SETTINGS_REVERSE.

Since: 2.10

setScale

printSettingsSetScale Source #

Arguments

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

settings: a PrintSettings

-> Double

scale: the scale in percent

-> m () 

Sets the value of PRINT_SETTINGS_SCALE.

Since: 2.10

setUseColor

printSettingsSetUseColor Source #

Arguments

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

settings: a PrintSettings

-> Bool

useColor: whether to use color

-> m () 

Sets the value of PRINT_SETTINGS_USE_COLOR.

Since: 2.10

toFile

printSettingsToFile Source #

Arguments

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

settings: a PrintSettings

-> [Char]

fileName: the file to save to

-> m ()

(Can throw GError)

This function saves the print settings from settings to fileName. If the file could not be loaded then error is set to either a FileError or KeyFileError.

Since: 2.12

toGvariant

printSettingsToGvariant Source #

Arguments

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

settings: a PrintSettings

-> m GVariant

Returns: a new, floating, GVariant

Serialize print settings to an a{sv} variant.

Since: 3.22

toKeyFile

printSettingsToKeyFile Source #

Arguments

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

settings: a PrintSettings

-> KeyFile

keyFile: the KeyFile to save the print settings to

-> Maybe Text

groupName: the group to add the settings to in keyFile, or Nothing to use the default “Print Settings”

-> m () 

This function adds the print settings from settings to keyFile.

Since: 2.12

unset

printSettingsUnset Source #

Arguments

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

settings: a PrintSettings

-> Text

key: a key

-> m () 

Removes any value associated with key. This has the same effect as setting the value to Nothing.

Since: 2.10