It derives from <GObject>.
Collects 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.
Copies a <GtkPrintSettings> object.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPrintSettings>.
a newly allocated copy of self
Calls func for each key-value pair of self.
Passed: a <GtkPrintSettings>.
Passed: a procedure.
the function to call
See GtkPrintSettingsFunc for how it is
called.
Not passed: guile-gi supplies it.
user data for func
Looks up the string value associated with key.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Returned: a string, or #f.
the string value for key
Returns the boolean represented by the value that is associated with key.
The string “true” represents #t, any other string #f.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Returned: a boolean.
#t, if key maps to a true value.
Gets the value of GTK_PRINT_SETTINGS_COLLATE.
Passed: a <GtkPrintSettings>.
Returned: a boolean.
whether to collate the printed pages
Gets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
Passed: a <GtkPrintSettings>.
Returned: a string, or #f.
the default source
Gets the value of GTK_PRINT_SETTINGS_DITHER.
Passed: a <GtkPrintSettings>.
Returned: a string, or #f.
the dithering that is used
Returns the double value associated with key, or 0.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Returned: a real number.
the double value of key
Returns the floating point number represented by the value that is associated with key, or default-val if the value does not represent a floating point number.
Floating point numbers are parsed with
ascii-strtod.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a real number.
the default value
Returned: a real number.
the floating point number associated with key
Gets the value of GTK_PRINT_SETTINGS_DUPLEX.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPrintDuplex>.
whether to print the output in duplex.
Gets the value of GTK_PRINT_SETTINGS_FINISHINGS.
Passed: a <GtkPrintSettings>.
Returned: a string, or #f.
the finishings
Returns the integer value of key, or 0.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Returned: a 32-bit integer.
the integer value of key
Returns the value of key, interpreted as an integer, or the default value.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a 32-bit integer.
the default value
Returned: a 32-bit integer.
the integer value of key
Returns the value associated with key, interpreted as a length.
The returned value is converted to units.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a <GtkUnit>, or one of its symbols.
the unit of the return value
Returned: a real number.
the length value of key, converted to unit
Gets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.
The set of media types is defined in PWG 5101.1-2002 PWG.
Passed: a <GtkPrintSettings>.
Returned: a string, or #f.
the media type
Gets the value of GTK_PRINT_SETTINGS_N_COPIES.
Passed: a <GtkPrintSettings>.
Returned: a 32-bit integer.
the number of copies to print
Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP.
Passed: a <GtkPrintSettings>.
Returned: a 32-bit integer.
the number of pages per sheet
Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
Passed: a <GtkPrintSettings>.
Returned: a <GtkNumberUpLayout>.
layout of page in number-up mode
Get the value of GTK_PRINT_SETTINGS_ORIENTATION, converted to a
<GtkPageOrientation>.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPageOrientation>.
the orientation
Gets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.
Passed: a <GtkPrintSettings>.
Returned: a string, or #f.
the output bin
Gets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.
Passed: a <GtkPrintSettings>.
Returned: a vector, each a <GtkPageRange>.
an array of <GtkPageRange>s. Use
byte-array:free to free the array when it is no
longer needed.
Not returned: it is the length of %return.
return location for the length of the returned array
Gets the value of GTK_PRINT_SETTINGS_PAGE_SET.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPageSet>.
the set of pages to print
Gets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to
unit.
Passed: a <GtkPrintSettings>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the paper height, in units of unit
Gets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a
<GtkPaperSize>.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPaperSize>, or #f.
the paper size
Gets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to
unit.
Passed: a <GtkPrintSettings>.
Passed: a <GtkUnit>, or one of its symbols.
the unit for the return value
Returned: a real number.
the paper width, in units of unit
Gets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPrintPages>.
which pages to print
Convenience function to obtain the value of
GTK_PRINT_SETTINGS_PRINTER.
Passed: a <GtkPrintSettings>.
Returned: a string, or #f.
the printer name
Gets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.
Passed: a <GtkPrintSettings>.
Returned: a real number.
the resolution in lpi (lines per inch)
Gets the value of GTK_PRINT_SETTINGS_QUALITY.
Passed: a <GtkPrintSettings>.
Returned: a <GtkPrintQuality>.
the print quality
Gets the value of GTK_PRINT_SETTINGS_RESOLUTION.
Passed: a <GtkPrintSettings>.
Returned: a 32-bit integer.
the resolution in dpi
Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_X.
Passed: a <GtkPrintSettings>.
Returned: a 32-bit integer.
the horizontal resolution in dpi
Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_Y.
Passed: a <GtkPrintSettings>.
Returned: a 32-bit integer.
the vertical resolution in dpi
Gets the value of GTK_PRINT_SETTINGS_REVERSE.
Passed: a <GtkPrintSettings>.
Returned: a boolean.
whether to reverse the order of the printed pages
Gets the value of GTK_PRINT_SETTINGS_SCALE.
Passed: a <GtkPrintSettings>.
Returned: a real number.
the scale in percent
Gets the value of GTK_PRINT_SETTINGS_USE_COLOR.
Passed: a <GtkPrintSettings>.
Returned: a boolean.
whether to use color
Returns #t, if a value is associated with key.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Returned: a boolean.
#t, if key has a value
Reads the print settings from file-name.
If the file could not be loaded then error is set to either a
<%GFileError> or
<%GKeyFileError>.
Passed: a <GtkPrintSettings>.
Passed: a file name, as a string.
the filename to read the settings from
Returned: a boolean.
#t on success
Reads the print settings from the group group-name in key-file.
If the file could not be loaded then error is set to either a
<%GFileError> or
<%GKeyFileError>.
Passed: a <GtkPrintSettings>.
Passed: a <GKeyFile>.
the <GKeyFile> to retrieve the settings from
Passed, or left out: a string, or #f.
the name of the group to use, or #f to use the default “Print
Settings”
Returned: a boolean.
#t on success
Creates a new <GtkPrintSettings> object.
Returned: a <GtkPrintSettings>.
a new <GtkPrintSettings> object
Reads the print settings from file-name.
Returns a new <GtkPrintSettings> object with
the restored settings, or #f if an error occurred. If the file
could not be loaded then error is set to either a
<%GFileError> or
<%GKeyFileError>.
Passed: a file name, as a string.
the filename to read the settings from
Returned: a <GtkPrintSettings>.
the restored <GtkPrintSettings>
Deserialize print settings from an a{sv} variant.
The variant must be in the format produced by print-settings:to-gvariant.
Passed: a <GVariant>.
an a{sv} <GVariant>
Returned: a <GtkPrintSettings>.
a new <GtkPrintSettings> object
Reads the print settings from the group group-name in key-file.
Returns a new <GtkPrintSettings> object with
the restored settings, or #f if an error occurred. If the file
could not be loaded then error is set to either
<%GFileError> or
<%GKeyFileError>.
Passed: a <GKeyFile>.
the <GKeyFile> to retrieve the settings from
Passed, or left out: a string, or #f.
the name of the group to use, or #f to use the default “Print
Settings”
Returned: a <GtkPrintSettings>.
the restored <GtkPrintSettings>
Associates value with key.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed, or left out: a string, or #f.
a string value
Sets key to a boolean value.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a boolean.
a boolean
Sets the value of GTK_PRINT_SETTINGS_COLLATE.
Passed: a <GtkPrintSettings>.
Passed: a boolean.
whether to collate the output
Sets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
Passed: a <GtkPrintSettings>.
Passed: a string.
the default source
Sets the value of GTK_PRINT_SETTINGS_DITHER.
Passed: a <GtkPrintSettings>.
Passed: a string.
the dithering that is used
Sets key to a double value.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a real number.
a double value
Sets the value of GTK_PRINT_SETTINGS_DUPLEX.
Passed: a <GtkPrintSettings>.
Passed: a <GtkPrintDuplex>, or one of its
symbols.
a <GtkPrintDuplex> value
Sets the value of GTK_PRINT_SETTINGS_FINISHINGS.
Passed: a <GtkPrintSettings>.
Passed: a string.
the finishings
Sets key to an integer value.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a 32-bit integer.
an integer
Associates a length in units of unit with key.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key
Passed: a real number.
a length
Passed: a <GtkUnit>, or one of its symbols.
the unit of length
Sets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE.
The set of media types is defined in PWG 5101.1-2002 PWG.
Passed: a <GtkPrintSettings>.
Passed: a string.
the media type
Sets the value of GTK_PRINT_SETTINGS_N_COPIES.
Passed: a <GtkPrintSettings>.
Passed: a 32-bit integer.
the number of copies
Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP.
Passed: a <GtkPrintSettings>.
Passed: a 32-bit integer.
the number of pages per sheet
Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
Passed: a <GtkPrintSettings>.
Passed: a <GtkNumberUpLayout>, or one of
its symbols.
a <GtkNumberUpLayout> value
Sets the value of GTK_PRINT_SETTINGS_ORIENTATION.
Passed: a <GtkPrintSettings>.
Passed: a <GtkPageOrientation>, or one of
its symbols.
a page orientation
Sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN.
Passed: a <GtkPrintSettings>.
Passed: a string.
the output bin
Sets the value of GTK_PRINT_SETTINGS_PAGE_RANGES.
Passed: a <GtkPrintSettings>.
Passed: a list or vector, each a <GtkPageRange>.
an array of <GtkPageRange>s
Not passed: guile-gi gives the length of page-ranges.
the length of page-ranges
Sets the value of GTK_PRINT_SETTINGS_PAGE_SET.
Passed: a <GtkPrintSettings>.
Passed: a <GtkPageSet>, or one of its symbols.
a <GtkPageSet> value
Sets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT.
Passed: a <GtkPrintSettings>.
Passed: a real number.
the paper height
Passed: a <GtkUnit>, or one of its symbols.
the units of height
Sets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT,
GTK_PRINT_SETTINGS_PAPER_WIDTH and
GTK_PRINT_SETTINGS_PAPER_HEIGHT.
Passed: a <GtkPrintSettings>.
Passed: a <GtkPaperSize>.
a paper size
Sets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH.
Passed: a <GtkPrintSettings>.
Passed: a real number.
the paper width
Passed: a <GtkUnit>, or one of its symbols.
the units of width
Sets the value of GTK_PRINT_SETTINGS_PRINT_PAGES.
Passed: a <GtkPrintSettings>.
Passed: a <GtkPrintPages>, or one of its
symbols.
a <GtkPrintPages> value
Convenience function to set GTK_PRINT_SETTINGS_PRINTER to
printer.
Passed: a <GtkPrintSettings>.
Passed: a string.
the printer name
Sets the value of GTK_PRINT_SETTINGS_PRINTER_LPI.
Passed: a <GtkPrintSettings>.
Passed: a real number.
the resolution in lpi (lines per inch)
Sets the value of GTK_PRINT_SETTINGS_QUALITY.
Passed: a <GtkPrintSettings>.
Passed: a <GtkPrintQuality>, or one of its
symbols.
a <GtkPrintQuality> value
Sets the values of GTK_PRINT_SETTINGS_RESOLUTION,
GTK_PRINT_SETTINGS_RESOLUTION_X and
GTK_PRINT_SETTINGS_RESOLUTION_Y.
Passed: a <GtkPrintSettings>.
Passed: a 32-bit integer.
the resolution in dpi
Sets the values of GTK_PRINT_SETTINGS_RESOLUTION,
GTK_PRINT_SETTINGS_RESOLUTION_X and
GTK_PRINT_SETTINGS_RESOLUTION_Y.
Passed: a <GtkPrintSettings>.
Passed: a 32-bit integer.
the horizontal resolution in dpi
Passed: a 32-bit integer.
the vertical resolution in dpi
Sets the value of GTK_PRINT_SETTINGS_REVERSE.
Passed: a <GtkPrintSettings>.
Passed: a boolean.
whether to reverse the output
Sets the value of GTK_PRINT_SETTINGS_SCALE.
Passed: a <GtkPrintSettings>.
Passed: a real number.
the scale in percent
Sets the value of GTK_PRINT_SETTINGS_USE_COLOR.
Passed: a <GtkPrintSettings>.
Passed: a boolean.
whether to use color
This function saves the print settings from self to file-name.
If the file could not be written then error is set to either a
<%GFileError> or
<%GKeyFileError>.
Passed: a <GtkPrintSettings>.
Passed: a file name, as a string.
the file to save to
Returned: a boolean.
#t on success
Serialize print settings to an a{sv} variant.
Passed: a <GtkPrintSettings>.
Returned: a <GVariant>.
a new, floating, <GVariant>
This function adds the print settings from self to key-file.
Passed: a <GtkPrintSettings>.
Passed: a <GKeyFile>.
the <GKeyFile> to save the print settings to
Passed, or left out: a string, or #f.
the group to add the settings to in key-file, or #f to use
the default “Print Settings”
Removes any value associated with key.
This has the same effect as setting the value to #f.
Passed: a <GtkPrintSettings>.
Passed: a string.
a key