package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Print_settings

type t = [ `print_settings | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new PrintSettings

val new_from_file : string -> (t, GError.t) result

Create a new PrintSettings

val new_from_gvariant : Gvariant.t -> t

Create a new PrintSettings

val unset : t -> string -> unit

Removes any value associated with @key.

This has the same effect as setting the value to %NULL.

val to_gvariant : t -> Gvariant.t

Serialize print settings to an asv variant.

val to_file : t -> string -> (bool, GError.t) result

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 `GFileError` or `GKeyFileError`.

val set_use_color : t -> bool -> unit

Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR.

val set_scale : t -> float -> unit

Sets the value of %GTK_PRINT_SETTINGS_SCALE.

val set_reverse : t -> bool -> unit

Sets the value of %GTK_PRINT_SETTINGS_REVERSE.

val set_resolution_xy : t -> int -> int -> unit

Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, %GTK_PRINT_SETTINGS_RESOLUTION_X and %GTK_PRINT_SETTINGS_RESOLUTION_Y.

val set_resolution : t -> int -> unit

Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, %GTK_PRINT_SETTINGS_RESOLUTION_X and %GTK_PRINT_SETTINGS_RESOLUTION_Y.

val set_quality : t -> Gtk_enums.printquality -> unit

Sets the value of %GTK_PRINT_SETTINGS_QUALITY.

val set_printer_lpi : t -> float -> unit

Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.

val set_printer : t -> string -> unit

Convenience function to set %GTK_PRINT_SETTINGS_PRINTER to @printer.

val set_print_pages : t -> Gtk_enums.printpages -> unit

Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.

val set_paper_width : t -> float -> Gtk_enums.unit -> unit

Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH.

val set_paper_size : t -> [ `paper_size ] Gobject.obj -> unit

Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, %GTK_PRINT_SETTINGS_PAPER_WIDTH and %GTK_PRINT_SETTINGS_PAPER_HEIGHT.

val set_paper_height : t -> float -> Gtk_enums.unit -> unit

Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT.

val set_page_set : t -> Gtk_enums.pageset -> unit

Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET.

val set_page_ranges : t -> [ `page_range ] Gobject.obj array -> int -> unit

Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.

val set_output_bin : t -> string -> unit

Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.

val set_orientation : t -> Gtk_enums.pageorientation -> unit

Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION.

val set_number_up_layout : t -> Gtk_enums.numberuplayout -> unit

Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

val set_number_up : t -> int -> unit

Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.

val set_n_copies : t -> int -> unit

Sets the value of %GTK_PRINT_SETTINGS_N_COPIES.

val set_media_type : t -> string -> unit

Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.

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

val set_length : t -> string -> float -> Gtk_enums.unit -> unit

Associates a length in units of @unit with @key.

val set_int : t -> string -> int -> unit

Sets @key to an integer value.

val set_finishings : t -> string -> unit

Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS.

val set_duplex : t -> Gtk_enums.printduplex -> unit

Sets the value of %GTK_PRINT_SETTINGS_DUPLEX.

val set_double : t -> string -> float -> unit

Sets @key to a double value.

val set_dither : t -> string -> unit

Sets the value of %GTK_PRINT_SETTINGS_DITHER.

val set_default_source : t -> string -> unit

Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

val set_collate : t -> bool -> unit

Sets the value of %GTK_PRINT_SETTINGS_COLLATE.

val set_bool : t -> string -> bool -> unit

Sets @key to a boolean value.

val set : t -> string -> string option -> unit

Associates @value with @key.

val load_file : t -> string -> (bool, GError.t) result

Reads the print settings from @file_name.

If the file could not be loaded then error is set to either a `GFileError` or `GKeyFileError`.

See method@Gtk.PrintSettings.to_file.

val has_key : t -> string -> bool

Returns %TRUE, if a value is associated with @key.

val get_use_color : t -> bool

Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR.

val get_scale : t -> float

Gets the value of %GTK_PRINT_SETTINGS_SCALE.

val get_reverse : t -> bool

Gets the value of %GTK_PRINT_SETTINGS_REVERSE.

val get_resolution_y : t -> int

Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y.

val get_resolution_x : t -> int

Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X.

val get_resolution : t -> int

Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION.

val get_quality : t -> Gtk_enums.printquality

Gets the value of %GTK_PRINT_SETTINGS_QUALITY.

val get_printer_lpi : t -> float

Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI.

val get_printer : t -> string option

Convenience function to obtain the value of %GTK_PRINT_SETTINGS_PRINTER.

val get_print_pages : t -> Gtk_enums.printpages

Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES.

val get_paper_width : t -> Gtk_enums.unit -> float

Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to @unit.

val get_paper_size : t -> [ `paper_size ] Gobject.obj option

Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a `GtkPaperSize`.

val get_paper_height : t -> Gtk_enums.unit -> float

Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to @unit.

val get_page_set : t -> Gtk_enums.pageset

Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET.

val get_page_ranges : t -> [ `page_range ] Gobject.obj array * int

Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES.

val get_output_bin : t -> string option

Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.

val get_orientation : t -> Gtk_enums.pageorientation

Get the value of %GTK_PRINT_SETTINGS_ORIENTATION, converted to a `GtkPageOrientation`.

val get_number_up_layout : t -> Gtk_enums.numberuplayout

Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT.

val get_number_up : t -> int

Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP.

val get_n_copies : t -> int

Gets the value of %GTK_PRINT_SETTINGS_N_COPIES.

val get_media_type : t -> string option

Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE.

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

val get_length : t -> string -> Gtk_enums.unit -> float

Returns the value associated with @key, interpreted as a length.

The returned value is converted to @units.

val get_int_with_default : t -> string -> int -> int

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

val get_int : t -> string -> int

Returns the integer value of @key, or 0.

val get_finishings : t -> string option

Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.

val get_duplex : t -> Gtk_enums.printduplex

Gets the value of %GTK_PRINT_SETTINGS_DUPLEX.

val get_double_with_default : t -> string -> float -> float

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().

val get_double : t -> string -> float

Returns the double value associated with @key, or 0.

val get_dither : t -> string option

Gets the value of %GTK_PRINT_SETTINGS_DITHER.

val get_default_source : t -> string option

Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.

val get_collate : t -> bool

Gets the value of %GTK_PRINT_SETTINGS_COLLATE.

val get_bool : t -> string -> bool

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

The string “true” represents %TRUE, any other string %FALSE.

val get : t -> string -> string option

Looks up the string value associated with @key.

val copy : t -> t

Copies a `GtkPrintSettings` object.