[858:14] static extends: object
Alternate constructors for PrintSettings. Usage:
PrintSettingsCtors.<name>(...). The primary constructor lives
directly on PrintSettings.
newFromFile (string file_name)
Reads the print settings from @file_name. Returns a new
GtkPrintSettingsobject with the restored settings, or %NULL if an error occurred. If the file could not be loaded then error is set to either aGFileErrororGKeyFileError. See [method@Gtk.PrintSettings.to_file].
file_name is the filename to read the settings from.A new PrintSettings.newFromGvariant (object variant)
Deserialize print settings from an a{sv} variant. The variant must be in the format produced by [method@Gtk.PrintSettings.to_gvariant].
variant is an a{sv} GVariant.A new PrintSettings.newFromKeyFile (object key_file, string group_name)
Reads the print settings from the group @group_name in @key_file. Returns a new
GtkPrintSettingsobject with the restored settings, or %NULL if an error occurred. If the file could not be loaded then error is set to eitherGFileErrororGKeyFileError.
key_file is the GKeyFile to retrieve the settings from.group_name is the name of the group to use, or %NULL to use the default “Print Settings”.A new PrintSettings.[20:7] extends: object
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.
PrintSettings ()
Creates a new
GtkPrintSettingsobject.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.copy ()
Copies a
GtkPrintSettingsobject.
get (string key)
Looks up the string value associated with @key.
key is a key.get_bool (string key)
Returns the boolean represented by the value that is associated with
The string “true” represents %TRUE, any other string %FALSE.key is a key.get_collate ()
Gets the value of %GTK_PRINT_SETTINGS_COLLATE.
get_default_source ()
Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
get_dither ()
Gets the value of %GTK_PRINT_SETTINGS_DITHER.
get_double (string key)
Returns the double value associated with @key, or 0.
key is a key.get_double_with_default (string key, double def)
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 g_ascii_strtod().
key is a key.def is the default value.get_duplex ()
Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.
get_finishings ()
Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
get_int (string key)
Returns the integer value of @key, or 0.
key is a key.get_int_with_default (string key, int def)
Returns the value of @key, interpreted as an integer, or the default value.
key is a key.def is the default value.get_length (string key, string unit)
Returns the value associated with @key, interpreted as a length. The returned value is converted to @units.
key is a key.unit is the unit of the return value.get_media_type ()
Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE. The set of media types is defined in PWG 5101.1-2002 PWG.
get_n_copies ()
Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.
get_number_up ()
Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
get_number_up_layout ()
Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
get_orientation ()
Get the value of %GTK_PRINT_SETTINGS_ORIENTATION, converted to a
GtkPageOrientation.
get_output_bin ()
Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
get_page_set ()
Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
get_paper_height (string unit)
Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to @unit.
unit is the unit for the return value.get_paper_size ()
Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a
GtkPaperSize.
get_paper_width (string unit)
Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to @unit.
unit is the unit for the return value.get_print_pages ()
Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
get_printer ()
Convenience function to obtain the value of %GTK_PRINT_SETTINGS_PRINTER.
get_printer_lpi ()
Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
get_quality ()
Gets the value of %GTK_PRINT_SETTINGS_QUALITY.
get_resolution ()
Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.
get_resolution_x ()
Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.
get_resolution_y ()
Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.
get_reverse ()
Gets the value of %GTK_PRINT_SETTINGS_REVERSE.
get_scale ()
Gets the value of %GTK_PRINT_SETTINGS_SCALE.
get_use_color ()
Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
has_key (string key)
Returns %TRUE, if a value is associated with @key.
key is a key.load_file (string file_name)
Reads the print settings from @file_name. If the file could not be loaded then error is set to either a
GFileErrororGKeyFileError. See [method@Gtk.PrintSettings.to_file].
file_name is the filename to read the settings from.load_key_file (object key_file, string group_name)
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
GFileErrororGKeyFileError.
key_file is the GKeyFile to retrieve the settings from.group_name is the name of the group to use, or %NULL to use the default “Print Settings”.set (string key, string value)
Associates @value with @key.
key is a key.value is a string value.None.set_bool (string key, bool value)
Sets @key to a boolean value.
key is a key.value is a boolean.None.set_collate (bool collate)
Sets the value of %GTK_PRINT_SETTINGS_COLLATE.
collate is whether to collate the output.None.set_default_source (string default_source)
Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
default_source is the default source.None.set_dither (string dither)
Sets the value of %GTK_PRINT_SETTINGS_DITHER.
dither is the dithering that is used.None.set_double (string key, double value)
Sets @key to a double value.
key is a key.value is a double value.None.set_duplex (string duplex)
Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.
duplex is a GtkPrintDuplex value.None.set_finishings (string finishings)
Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
finishings is the finishings.None.set_int (string key, int value)
Sets @key to an integer value.
key is a key.value is an integer.None.set_length (string key, double value, string unit)
Associates a length in units of @unit with @key.
key is a key.value is a length.unit is the unit of @length.None.set_media_type (string media_type)
Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE. The set of media types is defined in PWG 5101.1-2002 PWG.
media_type is the media type.None.set_n_copies (int num_copies)
Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.
num_copies is the number of copies.None.set_number_up (int number_up)
Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.
number_up is the number of pages per sheet.None.set_number_up_layout (string number_up_layout)
Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.
number_up_layout is a GtkNumberUpLayout value.None.set_orientation (string orientation)
Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.
orientation is a page orientation.None.set_output_bin (string output_bin)
Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
output_bin is the output bin.None.set_page_set (string page_set)
Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.
page_set is a GtkPageSet value.None.set_paper_height (double height, string unit)
Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
height is the paper height.unit is the units of @height.None.set_paper_size (object paper_size)
Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, %GTK_PRINT_SETTINGS_PAPER_WIDTH and %GTK_PRINT_SETTINGS_PAPER_HEIGHT.
paper_size is a paper size.None.set_paper_width (double width, string unit)
Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.
width is the paper width.unit is the units of @width.None.set_print_pages (string pages)
Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.
pages is a GtkPrintPages value.None.set_printer (string printer)
Convenience function to set %GTK_PRINT_SETTINGS_PRINTER to @printer.
printer is the printer name.None.set_printer_lpi (double lpi)
Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.
lpi is the resolution in lpi (lines per inch).None.set_quality (string quality)
Sets the value of %GTK_PRINT_SETTINGS_QUALITY.
quality is a GtkPrintQuality value.None.set_resolution (int resolution)
Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, %GTK_PRINT_SETTINGS_RESOLUTION_X and %GTK_PRINT_SETTINGS_RESOLUTION_Y.
resolution is the resolution in dpi.None.set_resolution_xy (int resolution_x, int resolution_y)
Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, %GTK_PRINT_SETTINGS_RESOLUTION_X and %GTK_PRINT_SETTINGS_RESOLUTION_Y.
resolution_x is the horizontal resolution in dpi.resolution_y is the vertical resolution in dpi.None.set_reverse (bool reverse)
Sets the value of %GTK_PRINT_SETTINGS_REVERSE.
reverse is whether to reverse the output.None.set_scale (double scale)
Sets the value of %GTK_PRINT_SETTINGS_SCALE.
scale is the scale in percent.None.set_use_color (bool use_color)
Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.
use_color is whether to use color.None.to_file (string file_name)
This function saves the print settings from @settings to @file_name. If the file could not be written then error is set to either a
GFileErrororGKeyFileError.
file_name is the file to save to.to_gvariant ()
Serialize print settings to an a{sv} variant.
to_key_file (object key_file, string group_name)
This function adds the print settings from @settings to @key_file.
key_file is the GKeyFile to save the print settings to.group_name is the group to add the settings to in @key_file, or %NULL to use the default “Print Settings”.None.unset (string key)
Removes any value associated with @key. This has the same effect as setting the value to %NULL.
key is a key.None.