Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
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.
Synopsis
- newtype PrintSettings = PrintSettings (ManagedPtr PrintSettings)
- class (GObject o, IsDescendantOf PrintSettings o) => IsPrintSettings o
- toPrintSettings :: (MonadIO m, IsPrintSettings o) => o -> m 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 -> Maybe Text -> m ()
- printSettingsUnset :: (HasCallStack, MonadIO m, IsPrintSettings a) => a -> Text -> m ()
Exported types
newtype PrintSettings Source #
Memory-managed wrapper type.
PrintSettings (ManagedPtr PrintSettings) |
Instances
Eq PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings (==) :: PrintSettings -> PrintSettings -> Bool # (/=) :: PrintSettings -> PrintSettings -> Bool # | |
GObject PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings | |
ManagedPtrNewtype PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings toManagedPtr :: PrintSettings -> ManagedPtr PrintSettings | |
TypedObject PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings | |
HasParentTypes PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings | |
IsGValue (Maybe PrintSettings) Source # | Convert |
Defined in GI.Gtk.Objects.PrintSettings gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe PrintSettings -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe PrintSettings) | |
type ParentTypes PrintSettings Source # | |
Defined in GI.Gtk.Objects.PrintSettings |
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
(GObject o, IsDescendantOf PrintSettings o) => IsPrintSettings o 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
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, copy, forceFloating, foreach, freezeNotify, get, getv, hasKey, isFloating, loadFile, loadKeyFile, notify, notifyByPspec, ref, refSink, runDispose, set, stealData, stealQdata, thawNotify, toFile, toGvariant, toKeyFile, unref, unset, watchClosure.
Getters
getBool, getCollate, getData, getDefaultSource, getDither, getDouble, getDoubleWithDefault, getDuplex, getFinishings, getInt, getIntWithDefault, getLength, getMediaType, getNCopies, getNumberUp, getNumberUpLayout, getOrientation, getOutputBin, getPageRanges, getPageSet, getPaperHeight, getPaperSize, getPaperWidth, getPrintPages, getPrinter, getPrinterLpi, getProperty, getQdata, getQuality, getResolution, getResolutionX, getResolutionY, getReverse, getScale, getUseColor.
Setters
setBool, setCollate, setData, setDataFull, setDefaultSource, setDither, setDouble, setDuplex, setFinishings, setInt, setLength, setMediaType, setNCopies, setNumberUp, setNumberUpLayout, setOrientation, setOutputBin, setPageRanges, setPageSet, setPaperHeight, setPaperSize, setPaperWidth, setPrintPages, setPrinter, setPrinterLpi, setProperty, setQuality, setResolution, setResolutionXy, setReverse, setScale, setUseColor.
copy
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintSettings | Returns: a newly allocated copy of |
Copies a PrintSettings
object.
foreach
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintSettingsFunc |
|
-> m () |
Calls func
for each key-value pair of settings
.
get
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Text | Returns: the string value for |
Looks up the string value associated with key
.
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
.
getDefaultSource
printSettingsGetDefaultSource Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the default source |
Gets the value of PRINT_SETTINGS_DEFAULT_SOURCE
.
getDither
printSettingsGetDither Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the dithering that is used |
Gets the value of PRINT_SETTINGS_DITHER
.
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.
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
.
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
.
getFinishings
printSettingsGetFinishings Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the finishings |
Gets the value of PRINT_SETTINGS_FINISHINGS
.
getInt
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Int32 | Returns: the integer value of |
Returns the integer value of key
, or 0.
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.
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
.
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.
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
.
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
.
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
.
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
.
getOutputBin
printSettingsGetOutputBin Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Text | Returns: the output bin |
Gets the value of PRINT_SETTINGS_OUTPUT_BIN
.
getPageRanges
printSettingsGetPageRanges Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m [PageRange] | Returns: an array
of |
Gets the value of PRINT_SETTINGS_PAGE_RANGES
.
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
.
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
.
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
.
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
.
getPrintPages
printSettingsGetPrintPages Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintPages | Returns: which pages to print |
Gets the value of PRINT_SETTINGS_PRINT_PAGES
.
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
.
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
.
getQuality
printSettingsGetQuality Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m PrintQuality | Returns: the print quality |
Gets the value of PRINT_SETTINGS_QUALITY
.
getResolution
printSettingsGetResolution Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Int32 | Returns: the resolution in dpi |
Gets the value of PRINT_SETTINGS_RESOLUTION
.
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
.
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
.
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
.
getScale
printSettingsGetScale Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Double | Returns: the scale in percent |
Gets the value of PRINT_SETTINGS_SCALE
.
getUseColor
printSettingsGetUseColor Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m Bool | Returns: whether to use color |
Gets the value of PRINT_SETTINGS_USE_COLOR
.
hasKey
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Returns True
, if a value is associated with key
.
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
.
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
.
new
:: (HasCallStack, MonadIO m) | |
=> m PrintSettings | Returns: a new |
Creates a new PrintSettings
object.
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
.
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
.
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
.
set
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Maybe Text |
|
-> m () |
Associates value
with key
.
setBool
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m () |
Sets key
to a boolean value.
setCollate
printSettingsSetCollate Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the value of PRINT_SETTINGS_COLLATE
.
setDefaultSource
printSettingsSetDefaultSource Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_DEFAULT_SOURCE
.
setDither
printSettingsSetDither Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_DITHER
.
setDouble
printSettingsSetDouble Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> m () |
Sets key
to a double value.
setDuplex
printSettingsSetDuplex Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintDuplex |
|
-> m () |
Sets the value of PRINT_SETTINGS_DUPLEX
.
setFinishings
printSettingsSetFinishings Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_FINISHINGS
.
setInt
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Sets key
to an integer value.
setLength
printSettingsSetLength Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> Double |
|
-> Unit |
|
-> m () |
Associates a length in units of unit
with key
.
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.
setNCopies
printSettingsSetNCopies Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the value of PRINT_SETTINGS_N_COPIES
.
setNumberUp
printSettingsSetNumberUp Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the value of PRINT_SETTINGS_NUMBER_UP
.
setNumberUpLayout
printSettingsSetNumberUpLayout Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> NumberUpLayout |
|
-> m () |
Sets the value of PRINT_SETTINGS_NUMBER_UP_LAYOUT
.
setOrientation
printSettingsSetOrientation Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PageOrientation |
|
-> m () |
Sets the value of PRINT_SETTINGS_ORIENTATION
.
setOutputBin
printSettingsSetOutputBin Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the value of PRINT_SETTINGS_OUTPUT_BIN
.
setPageRanges
printSettingsSetPageRanges Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> [PageRange] |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAGE_RANGES
.
setPageSet
printSettingsSetPageSet Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PageSet |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAGE_SET
.
setPaperHeight
printSettingsSetPaperHeight Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAPER_HEIGHT
.
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
.
setPaperWidth
printSettingsSetPaperWidth Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> Unit |
|
-> m () |
Sets the value of PRINT_SETTINGS_PAPER_WIDTH
.
setPrintPages
printSettingsSetPrintPages Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintPages |
|
-> m () |
Sets the value of PRINT_SETTINGS_PRINT_PAGES
.
setPrinter
printSettingsSetPrinter Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Text |
|
-> m () |
Convenience function to set PRINT_SETTINGS_PRINTER
to printer
.
setPrinterLpi
printSettingsSetPrinterLpi Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the value of PRINT_SETTINGS_PRINTER_LPI
.
setQuality
printSettingsSetQuality Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> PrintQuality |
|
-> m () |
Sets the value of PRINT_SETTINGS_QUALITY
.
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
.
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
.
setReverse
printSettingsSetReverse Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the value of PRINT_SETTINGS_REVERSE
.
setScale
printSettingsSetScale Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Double |
|
-> m () |
Sets the value of PRINT_SETTINGS_SCALE
.
setUseColor
printSettingsSetUseColor Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the value of PRINT_SETTINGS_USE_COLOR
.
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
.
toGvariant
printSettingsToGvariant Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> m GVariant | Returns: a new, floating, |
Serialize print settings to an a{sv} variant.
toKeyFile
printSettingsToKeyFile Source #
:: (HasCallStack, MonadIO m, IsPrintSettings a) | |
=> a |
|
-> KeyFile |
|
-> Maybe Text |
|
-> m () |
This function adds the print settings from settings
to keyFile
.
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
.