Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- copy
- foreach
- get
- getBool
- getCollate
- getDefaultSource
- getDither
- getDouble
- getDoubleWithDefault
- getDuplex
- getFinishings
- getInt
- getIntWithDefault
- getLength
- getMediaType
- getNCopies
- getNumberUp
- getNumberUpLayout
- getOrientation
- getOutputBin
- getPageRanges
- getPageSet
- getPaperHeight
- getPaperSize
- getPaperWidth
- getPrintPages
- getPrinter
- getPrinterLpi
- getQuality
- getResolution
- getResolutionX
- getResolutionY
- getReverse
- getScale
- getUseColor
- hasKey
- loadFile
- loadKeyFile
- new
- newFromFile
- newFromGvariant
- newFromKeyFile
- set
- setBool
- setCollate
- setDefaultSource
- setDither
- setDouble
- setDuplex
- setFinishings
- setInt
- setLength
- setMediaType
- setNCopies
- setNumberUp
- setNumberUpLayout
- setOrientation
- setOutputBin
- setPageRanges
- setPageSet
- setPaperHeight
- setPaperSize
- setPaperWidth
- setPrintPages
- setPrinter
- setPrinterLpi
- setQuality
- setResolution
- setResolutionXy
- setReverse
- setScale
- setUseColor
- toFile
- toGvariant
- toKeyFile
- unset
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
- newtype PrintSettings = PrintSettings (ManagedPtr PrintSettings)
- class GObject o => IsPrintSettings o
- toPrintSettings :: (MonadIO m, IsPrintSettings o) => o -> m PrintSettings
- noPrintSettings :: Maybe PrintSettings
- printSettingsCopy :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PrintSettings
- printSettingsForeach :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PrintSettingsFunc -> m ()
- printSettingsGet :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m Text
- printSettingsGetBool :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m Bool
- printSettingsGetCollate :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Bool
- printSettingsGetDefaultSource :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Text
- printSettingsGetDither :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Text
- printSettingsGetDouble :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m Double
- printSettingsGetDoubleWithDefault :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Double -> m Double
- printSettingsGetDuplex :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PrintDuplex
- printSettingsGetFinishings :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Text
- printSettingsGetInt :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m Int32
- printSettingsGetIntWithDefault :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Int32 -> m Int32
- printSettingsGetLength :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Unit -> m Double
- printSettingsGetMediaType :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Text
- printSettingsGetNCopies :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Int32
- printSettingsGetNumberUp :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Int32
- printSettingsGetNumberUpLayout :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m NumberUpLayout
- printSettingsGetOrientation :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PageOrientation
- printSettingsGetOutputBin :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Text
- printSettingsGetPageRanges :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m [PageRange]
- printSettingsGetPageSet :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PageSet
- printSettingsGetPaperHeight :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Unit -> m Double
- printSettingsGetPaperSize :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PaperSize
- printSettingsGetPaperWidth :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Unit -> m Double
- printSettingsGetPrintPages :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PrintPages
- printSettingsGetPrinter :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Text
- printSettingsGetPrinterLpi :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Double
- printSettingsGetQuality :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m PrintQuality
- printSettingsGetResolution :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Int32
- printSettingsGetResolutionX :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Int32
- printSettingsGetResolutionY :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Int32
- printSettingsGetReverse :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Bool
- printSettingsGetScale :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Double
- printSettingsGetUseColor :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m Bool
- printSettingsHasKey :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m Bool
- printSettingsLoadFile :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> [Char] -> m ()
- printSettingsLoadKeyFile :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> KeyFile -> Maybe Text -> m ()
- printSettingsNew :: (HasCallStack, MonadIO m) => m PrintSettings
- printSettingsNewFromFile :: (HasCallStack, MonadIO m) => [Char] -> m PrintSettings
- printSettingsNewFromGvariant :: (HasCallStack, MonadIO m) => GVariant -> m PrintSettings
- printSettingsNewFromKeyFile :: (HasCallStack, MonadIO m) => KeyFile -> Maybe Text -> m PrintSettings
- printSettingsSet :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Maybe Text -> m ()
- printSettingsSetBool :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Bool -> m ()
- printSettingsSetCollate :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Bool -> m ()
- printSettingsSetDefaultSource :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
- printSettingsSetDither :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
- printSettingsSetDouble :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Double -> m ()
- printSettingsSetDuplex :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PrintDuplex -> m ()
- printSettingsSetFinishings :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
- printSettingsSetInt :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Int32 -> m ()
- printSettingsSetLength :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> Double -> Unit -> m ()
- printSettingsSetMediaType :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
- printSettingsSetNCopies :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Int32 -> m ()
- printSettingsSetNumberUp :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Int32 -> m ()
- printSettingsSetNumberUpLayout :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> NumberUpLayout -> m ()
- printSettingsSetOrientation :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PageOrientation -> m ()
- printSettingsSetOutputBin :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
- printSettingsSetPageRanges :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> [PageRange] -> m ()
- printSettingsSetPageSet :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PageSet -> m ()
- printSettingsSetPaperHeight :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Double -> Unit -> m ()
- printSettingsSetPaperSize :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PaperSize -> m ()
- printSettingsSetPaperWidth :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Double -> Unit -> m ()
- printSettingsSetPrintPages :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PrintPages -> m ()
- printSettingsSetPrinter :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
- printSettingsSetPrinterLpi :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Double -> m ()
- printSettingsSetQuality :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> PrintQuality -> m ()
- printSettingsSetResolution :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Int32 -> m ()
- printSettingsSetResolutionXy :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Int32 -> Int32 -> m ()
- printSettingsSetReverse :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Bool -> m ()
- printSettingsSetScale :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Double -> m ()
- printSettingsSetUseColor :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Bool -> m ()
- printSettingsToFile :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> [Char] -> m ()
- printSettingsToGvariant :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> m GVariant
- printSettingsToKeyFile :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> KeyFile -> Text -> m ()
- printSettingsUnset :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
Exported types
newtype PrintSettings Source #
Memory-managed wrapper type.
Instances
GObject PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings gobjectType :: PrintSettings -> IO GType # | |
IsObject PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings | |
IsPrintSettings PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings |
class GObject o => IsPrintSettings o Source #
Type class for types which can be safely cast to PrintSettings
, for instance with toPrintSettings
.
Instances
(GObject a, (UnknownAncestorError PrintSettings a :: Constraint)) => IsPrintSettings a Source # | |
Defined in GI.Gtk.Objects.PrintSettings | |
IsPrintSettings PrintSettings Source # | |
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
.
noPrintSettings :: Maybe PrintSettings Source #
A convenience alias for Nothing
:: Maybe
PrintSettings
.
Methods
copy
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintSettings | Returns: a newly allocated copy of |
Copies a PrintSettings
object.
Since: 2.10
foreach
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintSettingsFunc |
|
-> m () |
Calls func
for each key-value pair of settings
.
Since: 2.10
get
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Text | Returns: the string value for |
Looks up the string value associated with key
.
Since: 2.10
getBool
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
getCollate
printSettingsGetCollate Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Bool | Returns: whether to collate the printed pages |
Gets the value of PRINT_SETTINGS_COLLATE
.
Since: 2.10
getDefaultSource
printSettingsGetDefaultSource Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the default source |
Gets the value of PRINT_SETTINGS_DEFAULT_SOURCE
.
Since: 2.10
getDither
printSettingsGetDither Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the dithering that is used |
Gets the value of PRINT_SETTINGS_DITHER
.
Since: 2.10
getDouble
printSettingsGetDouble Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Double | Returns: the double value of |
Returns the double value associated with key
, or 0.
Since: 2.10
getDoubleWithDefault
printSettingsGetDoubleWithDefault Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> m Double | Returns: the floating point number associated with |
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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintDuplex | Returns: whether to print the output in duplex. |
Gets the value of PRINT_SETTINGS_DUPLEX
.
Since: 2.10
getFinishings
printSettingsGetFinishings Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the finishings |
Gets the value of PRINT_SETTINGS_FINISHINGS
.
Since: 2.10
getInt
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Int32 | Returns: the integer value of |
Returns the integer value of key
, or 0.
Since: 2.10
getIntWithDefault
printSettingsGetIntWithDefault Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m Int32 | Returns: the integer value of |
Returns the value of key
, interpreted as
an integer, or the default value.
Since: 2.10
getLength
printSettingsGetLength Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Unit |
|
-> m Double | Returns: the length value of |
Returns the value associated with key
, interpreted
as a length. The returned value is converted to units
.
Since: 2.10
getMediaType
printSettingsGetMediaType Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Int32 | Returns: the number of copies to print |
Gets the value of PRINT_SETTINGS_N_COPIES
.
Since: 2.10
getNumberUp
printSettingsGetNumberUp Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Int32 | Returns: the number of pages per sheet |
Gets the value of PRINT_SETTINGS_NUMBER_UP
.
Since: 2.10
getNumberUpLayout
printSettingsGetNumberUpLayout Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PageOrientation | Returns: the orientation |
Get the value of PRINT_SETTINGS_ORIENTATION
,
converted to a PageOrientation
.
Since: 2.10
getOutputBin
printSettingsGetOutputBin Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the output bin |
Gets the value of PRINT_SETTINGS_OUTPUT_BIN
.
Since: 2.10
getPageRanges
printSettingsGetPageRanges Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m [PageRange] | Returns: an array
of |
Gets the value of PRINT_SETTINGS_PAGE_RANGES
.
Since: 2.10
getPageSet
printSettingsGetPageSet Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PageSet | Returns: the set of pages to print |
Gets the value of PRINT_SETTINGS_PAGE_SET
.
Since: 2.10
getPaperHeight
printSettingsGetPaperHeight Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Unit |
|
-> m Double | Returns: the paper height, in units of |
Gets the value of PRINT_SETTINGS_PAPER_HEIGHT
,
converted to unit
.
Since: 2.10
getPaperSize
printSettingsGetPaperSize Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PaperSize | Returns: the paper size |
Gets the value of PRINT_SETTINGS_PAPER_FORMAT
,
converted to a PaperSize
.
Since: 2.10
getPaperWidth
printSettingsGetPaperWidth Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Unit |
|
-> m Double | Returns: the paper width, in units of |
Gets the value of PRINT_SETTINGS_PAPER_WIDTH
,
converted to unit
.
Since: 2.10
getPrintPages
printSettingsGetPrintPages Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintPages | Returns: which pages to print |
Gets the value of PRINT_SETTINGS_PRINT_PAGES
.
Since: 2.10
getPrinter
printSettingsGetPrinter Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the printer name |
Convenience function to obtain the value of
PRINT_SETTINGS_PRINTER
.
Since: 2.10
getPrinterLpi
printSettingsGetPrinterLpi Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Double | Returns: the resolution in lpi (lines per inch) |
Gets the value of PRINT_SETTINGS_PRINTER_LPI
.
Since: 2.16
getQuality
printSettingsGetQuality Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintQuality | Returns: the print quality |
Gets the value of PRINT_SETTINGS_QUALITY
.
Since: 2.10
getResolution
printSettingsGetResolution Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Int32 | Returns: the resolution in dpi |
Gets the value of PRINT_SETTINGS_RESOLUTION
.
Since: 2.10
getResolutionX
printSettingsGetResolutionX Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Int32 | Returns: the horizontal resolution in dpi |
Gets the value of PRINT_SETTINGS_RESOLUTION_X
.
Since: 2.16
getResolutionY
printSettingsGetResolutionY Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Int32 | Returns: the vertical resolution in dpi |
Gets the value of PRINT_SETTINGS_RESOLUTION_Y
.
Since: 2.16
getReverse
printSettingsGetReverse Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Double | Returns: the scale in percent |
Gets the value of PRINT_SETTINGS_SCALE
.
Since: 2.10
getUseColor
printSettingsGetUseColor Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Bool | Returns: whether to use color |
Gets the value of PRINT_SETTINGS_USE_COLOR
.
Since: 2.10
hasKey
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Returns True
, if a value is associated with key
.
Since: 2.10
loadFile
printSettingsLoadFile Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> [Char] |
|
-> m () | (Can throw |
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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> KeyFile |
|
-> Maybe Text |
|
-> m () | (Can throw |
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
:: (HasCallStack, MonadIO m) | |
=> m PrintSettings | Returns: a new |
Creates a new PrintSettings
object.
Since: 2.10
newFromFile
printSettingsNewFromFile Source #
:: (HasCallStack, MonadIO m) | |
=> [Char] |
|
-> m PrintSettings | Returns: the restored |
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 #
:: (HasCallStack, MonadIO m) | |
=> GVariant |
|
-> m PrintSettings | Returns: a new |
Deserialize print settings from an a{sv} variant in
the format produced by printSettingsToGvariant
.
Since: 3.22
newFromKeyFile
printSettingsNewFromKeyFile Source #
:: (HasCallStack, MonadIO m) | |
=> KeyFile |
|
-> Maybe Text |
|
-> m PrintSettings | Returns: the restored |
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
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> m () |
Associates value
with key
.
Since: 2.10
setBool
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m () |
Sets key
to a boolean value.
Since: 2.10
setCollate
printSettingsSetCollate Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the value of PRINT_SETTINGS_COLLATE
.
Since: 2.10
setDefaultSource
printSettingsSetDefaultSource Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_DEFAULT_SOURCE
.
Since: 2.10
setDither
printSettingsSetDither Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_DITHER
.
Since: 2.10
setDouble
printSettingsSetDouble Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> m () |
Sets key
to a double value.
Since: 2.10
setDuplex
printSettingsSetDuplex Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintDuplex |
|
-> m () |
Sets the value of PRINT_SETTINGS_DUPLEX
.
Since: 2.10
setFinishings
printSettingsSetFinishings Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_FINISHINGS
.
Since: 2.10
setInt
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Sets key
to an integer value.
Since: 2.10
setLength
printSettingsSetLength Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> Unit |
|
-> m () |
Associates a length in units of unit
with key
.
Since: 2.10
setMediaType
printSettingsSetMediaType Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the value of PRINT_SETTINGS_N_COPIES
.
Since: 2.10
setNumberUp
printSettingsSetNumberUp Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the value of PRINT_SETTINGS_NUMBER_UP
.
Since: 2.10
setNumberUpLayout
printSettingsSetNumberUpLayout Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> NumberUpLayout |
|
-> m () |
Sets the value of PRINT_SETTINGS_NUMBER_UP_LAYOUT
.
Since: 2.14
setOrientation
printSettingsSetOrientation Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PageOrientation |
|
-> m () |
Sets the value of PRINT_SETTINGS_ORIENTATION
.
Since: 2.10
setOutputBin
printSettingsSetOutputBin Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_OUTPUT_BIN
.
Since: 2.10
setPageRanges
printSettingsSetPageRanges Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> [PageRange] |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAGE_RANGES
.
Since: 2.10
setPageSet
printSettingsSetPageSet Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PageSet |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAGE_SET
.
Since: 2.10
setPaperHeight
printSettingsSetPaperHeight Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAPER_HEIGHT
.
Since: 2.10
setPaperSize
printSettingsSetPaperSize Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PaperSize |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAPER_FORMAT
,
PRINT_SETTINGS_PAPER_WIDTH
and
PRINT_SETTINGS_PAPER_HEIGHT
.
Since: 2.10
setPaperWidth
printSettingsSetPaperWidth Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAPER_WIDTH
.
Since: 2.10
setPrintPages
printSettingsSetPrintPages Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintPages |
|
-> m () |
Sets the value of PRINT_SETTINGS_PRINT_PAGES
.
Since: 2.10
setPrinter
printSettingsSetPrinter Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Convenience function to set PRINT_SETTINGS_PRINTER
to printer
.
Since: 2.10
setPrinterLpi
printSettingsSetPrinterLpi Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the value of PRINT_SETTINGS_PRINTER_LPI
.
Since: 2.16
setQuality
printSettingsSetQuality Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintQuality |
|
-> m () |
Sets the value of PRINT_SETTINGS_QUALITY
.
Since: 2.10
setResolution
printSettingsSetResolution Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the values of PRINT_SETTINGS_RESOLUTION
,
PRINT_SETTINGS_RESOLUTION_X
and
PRINT_SETTINGS_RESOLUTION_Y
.
Since: 2.10
setResolutionXy
printSettingsSetResolutionXy Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the values of PRINT_SETTINGS_RESOLUTION
,
PRINT_SETTINGS_RESOLUTION_X
and
PRINT_SETTINGS_RESOLUTION_Y
.
Since: 2.16
setReverse
printSettingsSetReverse Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the value of PRINT_SETTINGS_REVERSE
.
Since: 2.10
setScale
printSettingsSetScale Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the value of PRINT_SETTINGS_SCALE
.
Since: 2.10
setUseColor
printSettingsSetUseColor Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the value of PRINT_SETTINGS_USE_COLOR
.
Since: 2.10
toFile
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> [Char] |
|
-> m () | (Can throw |
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 #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m GVariant | Returns: a new, floating, |
Serialize print settings to an a{sv} variant.
Since: 3.22
toKeyFile
printSettingsToKeyFile Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> KeyFile |
|
-> Text |
|
-> m () |
This function adds the print settings from settings
to keyFile
.
Since: 2.12
unset
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Removes any value associated with key
.
This has the same effect as setting the value to Nothing
.
Since: 2.10