// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gtk import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) // Function called by [method@Gtk.PrintSettings.foreach] on every key/value pair // inside a [class@Gtk.PrintSettings]. type PrintSettingsFunc func(string, string, uintptr) // A range of pages to print. // // See also [method@Gtk.PrintSettings.set_page_ranges]. type PageRange struct { _ structs.HostLayout Start int End int } func (x *PageRange) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } const ( // The key used by the “Print to file” printer to store whether to collate the // printed pages. PRINT_SETTINGS_COLLATE string = "collate" // The key used by the “Print to file” printer to store the default source. PRINT_SETTINGS_DEFAULT_SOURCE string = "default-source" // The key used by the “Print to file” printer to store the dither used. PRINT_SETTINGS_DITHER string = "dither" // The key used by the “Print to file” printer to store whether to print the // output in duplex. PRINT_SETTINGS_DUPLEX string = "duplex" // The key used by the “Print to file” printer to store the finishings. PRINT_SETTINGS_FINISHINGS string = "finishings" // The key used by the “Print to file” printer to store the media type. // // The set of media types is defined in PWG 5101.1-2002 PWG. PRINT_SETTINGS_MEDIA_TYPE string = "media-type" // The key used by the “Print to file” printer to store the number of pages per // sheet. PRINT_SETTINGS_NUMBER_UP string = "number-up" // The key used by the “Print to file” printer to store the number of pages per // sheet in number-up mode. PRINT_SETTINGS_NUMBER_UP_LAYOUT string = "number-up-layout" // The key used by the “Print to file” printer to store the number of copies. PRINT_SETTINGS_N_COPIES string = "n-copies" // The key used by the “Print to file” printer to store the orientation. PRINT_SETTINGS_ORIENTATION string = "orientation" // The key used by the “Print to file” printer to store the file // name of the output without the path to the directory and the // file extension. PRINT_SETTINGS_OUTPUT_BASENAME string = "output-basename" // The key used by the “Print to file” printer to store the output bin. PRINT_SETTINGS_OUTPUT_BIN string = "output-bin" // The key used by the “Print to file” printer to store the // directory to which the output should be written. PRINT_SETTINGS_OUTPUT_DIR string = "output-dir" // The key used by the “Print to file” printer to store the format // of the output. The supported values are “PS” and “PDF”. PRINT_SETTINGS_OUTPUT_FILE_FORMAT string = "output-file-format" // The key used by the “Print to file” printer to store the URI // to which the output should be written. GTK itself supports // only “file://” URIs. PRINT_SETTINGS_OUTPUT_URI string = "output-uri" // The key used by the “Print to file” printer to store the array of page ranges // to print. PRINT_SETTINGS_PAGE_RANGES string = "page-ranges" // The key used by the “Print to file” printer to store the set of pages to print. PRINT_SETTINGS_PAGE_SET string = "page-set" // The key used by the “Print to file” printer to store the page format. PRINT_SETTINGS_PAPER_FORMAT string = "paper-format" // The key used by the “Print to file” printer to store the page height. PRINT_SETTINGS_PAPER_HEIGHT string = "paper-height" // The key used by the “Print to file” printer to store the paper width. PRINT_SETTINGS_PAPER_WIDTH string = "paper-width" // The key used by the “Print to file” printer to store the printer name. PRINT_SETTINGS_PRINTER string = "printer" // The key used by the “Print to file” printer to store the resolution in lines // per inch. PRINT_SETTINGS_PRINTER_LPI string = "printer-lpi" // The key used by the “Print to file” printer to store which pages to print. PRINT_SETTINGS_PRINT_PAGES string = "print-pages" // The key used by the “Print to file” printer to store the printing quality. PRINT_SETTINGS_QUALITY string = "quality" // The key used by the “Print to file” printer to store the resolution in DPI. PRINT_SETTINGS_RESOLUTION string = "resolution" // The key used by the “Print to file” printer to store the horizontal // resolution in DPI. PRINT_SETTINGS_RESOLUTION_X string = "resolution-x" // The key used by the “Print to file” printer to store the vertical resolution // in DPI. PRINT_SETTINGS_RESOLUTION_Y string = "resolution-y" // The key used by the “Print to file” printer to store whether to reverse the // order of the printed pages. PRINT_SETTINGS_REVERSE string = "reverse" // The key used by the “Print to file” printer to store the scale. PRINT_SETTINGS_SCALE string = "scale" // The key used by the “Print to file” printer to store whether to print with // colors. PRINT_SETTINGS_USE_COLOR string = "use-color" // The key used by the “Print to file” printer to store 32-bit Windows extra // driver. PRINT_SETTINGS_WIN32_DRIVER_EXTRA string = "win32-driver-extra" // The key used by the “Print to file” printer to store the 32-bit Windows // driver version. PRINT_SETTINGS_WIN32_DRIVER_VERSION string = "win32-driver-version" ) // 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. type PrintSettings struct { gobject.Object } var xPrintSettingsGLibType func() types.GType func PrintSettingsGLibType() types.GType { return xPrintSettingsGLibType() } func PrintSettingsNewFromInternalPtr(ptr uintptr) *PrintSettings { cls := &PrintSettings{} cls.Ptr = ptr return cls } var xNewPrintSettings func() uintptr // Creates a new `GtkPrintSettings` object. func NewPrintSettings() *PrintSettings { var cls *PrintSettings cret := xNewPrintSettings() if cret == 0 { return nil } cls = &PrintSettings{} cls.Ptr = cret return cls } var xNewPrintSettingsFromFile func(string, **glib.Error) uintptr // Reads the print settings from @file_name. // // Returns a new `GtkPrintSettings` object with the restored settings, // or %NULL if an error occurred. If the file could not be loaded then // error is set to either a `GFileError` or `GKeyFileError`. // // See [method@Gtk.PrintSettings.to_file]. func NewPrintSettingsFromFile(FileNameVar string) (*PrintSettings, error) { var cls *PrintSettings var cerr *glib.Error cret := xNewPrintSettingsFromFile(FileNameVar, &cerr) if cret == 0 { return nil, cerr } cls = &PrintSettings{} cls.Ptr = cret if cerr == nil { return cls, nil } return cls, cerr } var xNewPrintSettingsFromGvariant func(*glib.Variant) uintptr // Deserialize print settings from an a{sv} variant. // // The variant must be in the format produced by // [method@Gtk.PrintSettings.to_gvariant]. func NewPrintSettingsFromGvariant(VariantVar *glib.Variant) *PrintSettings { var cls *PrintSettings cret := xNewPrintSettingsFromGvariant(VariantVar) if cret == 0 { return nil } cls = &PrintSettings{} cls.Ptr = cret return cls } var xNewPrintSettingsFromKeyFile func(*glib.KeyFile, uintptr, **glib.Error) uintptr // Reads the print settings from the group @group_name in @key_file. // // Returns a new `GtkPrintSettings` object with the restored settings, // or %NULL if an error occurred. If the file could not be loaded then // error is set to either `GFileError` or `GKeyFileError`. func NewPrintSettingsFromKeyFile(KeyFileVar *glib.KeyFile, GroupNameVar *string) (*PrintSettings, error) { var cls *PrintSettings var cerr *glib.Error GroupNameVarPtr := core.GStrdupNullable(GroupNameVar) defer core.GFreeNullable(GroupNameVarPtr) cret := xNewPrintSettingsFromKeyFile(KeyFileVar, GroupNameVarPtr, &cerr) if cret == 0 { return nil, cerr } cls = &PrintSettings{} cls.Ptr = cret if cerr == nil { return cls, nil } return cls, cerr } var xPrintSettingsCopy func(uintptr) uintptr // Copies a `GtkPrintSettings` object. func (x *PrintSettings) Copy() *PrintSettings { var cls *PrintSettings cret := xPrintSettingsCopy(x.GoPointer()) if cret == 0 { return nil } cls = &PrintSettings{} cls.Ptr = cret return cls } var xPrintSettingsForeach func(uintptr, uintptr, uintptr) // Calls @func for each key-value pair of @settings. func (x *PrintSettings) Foreach(FuncVar *PrintSettingsFunc, UserDataVar uintptr) { var FuncVarRef uintptr if FuncVar != nil { FuncVarPtr := uintptr(unsafe.Pointer(FuncVar)) if cbRefPtr, ok := glib.GetCallback(FuncVarPtr); ok { FuncVarRef = cbRefPtr } else { fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) { cbFn := *FuncVar cbFn(core.GoString(arg0), core.GoString(arg1), arg2) } FuncVarRef = purego.NewCallback(fcb) glib.SaveCallbackWithClosure(FuncVarPtr, FuncVarRef, FuncVar) } } xPrintSettingsForeach(x.GoPointer(), FuncVarRef, UserDataVar) } var xPrintSettingsGet func(uintptr, string) string // Looks up the string value associated with @key. func (x *PrintSettings) Get(KeyVar string) string { cret := xPrintSettingsGet(x.GoPointer(), KeyVar) return cret } var xPrintSettingsGetBool func(uintptr, string) bool // Returns the boolean represented by the value // that is associated with @key. // // The string “true” represents %TRUE, any other // string %FALSE. func (x *PrintSettings) GetBool(KeyVar string) bool { cret := xPrintSettingsGetBool(x.GoPointer(), KeyVar) return cret } var xPrintSettingsGetCollate func(uintptr) bool // Gets the value of %GTK_PRINT_SETTINGS_COLLATE. func (x *PrintSettings) GetCollate() bool { cret := xPrintSettingsGetCollate(x.GoPointer()) return cret } var xPrintSettingsGetDefaultSource func(uintptr) string // Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE. func (x *PrintSettings) GetDefaultSource() string { cret := xPrintSettingsGetDefaultSource(x.GoPointer()) return cret } var xPrintSettingsGetDither func(uintptr) string // Gets the value of %GTK_PRINT_SETTINGS_DITHER. func (x *PrintSettings) GetDither() string { cret := xPrintSettingsGetDither(x.GoPointer()) return cret } var xPrintSettingsGetDouble func(uintptr, string) float64 // Returns the double value associated with @key, or 0. func (x *PrintSettings) GetDouble(KeyVar string) float64 { cret := xPrintSettingsGetDouble(x.GoPointer(), KeyVar) return cret } var xPrintSettingsGetDoubleWithDefault func(uintptr, string, float64) float64 // 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(). func (x *PrintSettings) GetDoubleWithDefault(KeyVar string, DefVar float64) float64 { cret := xPrintSettingsGetDoubleWithDefault(x.GoPointer(), KeyVar, DefVar) return cret } var xPrintSettingsGetDuplex func(uintptr) PrintDuplex // Gets the value of %GTK_PRINT_SETTINGS_DUPLEX. func (x *PrintSettings) GetDuplex() PrintDuplex { cret := xPrintSettingsGetDuplex(x.GoPointer()) return cret } var xPrintSettingsGetFinishings func(uintptr) string // Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS. func (x *PrintSettings) GetFinishings() string { cret := xPrintSettingsGetFinishings(x.GoPointer()) return cret } var xPrintSettingsGetInt func(uintptr, string) int // Returns the integer value of @key, or 0. func (x *PrintSettings) GetInt(KeyVar string) int { cret := xPrintSettingsGetInt(x.GoPointer(), KeyVar) return cret } var xPrintSettingsGetIntWithDefault func(uintptr, string, int) int // Returns the value of @key, interpreted as // an integer, or the default value. func (x *PrintSettings) GetIntWithDefault(KeyVar string, DefVar int) int { cret := xPrintSettingsGetIntWithDefault(x.GoPointer(), KeyVar, DefVar) return cret } var xPrintSettingsGetLength func(uintptr, string, Unit) float64 // Returns the value associated with @key, interpreted // as a length. // // The returned value is converted to @units. func (x *PrintSettings) GetLength(KeyVar string, UnitVar Unit) float64 { cret := xPrintSettingsGetLength(x.GoPointer(), KeyVar, UnitVar) return cret } var xPrintSettingsGetMediaType func(uintptr) string // Gets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE. // // The set of media types is defined in PWG 5101.1-2002 PWG. func (x *PrintSettings) GetMediaType() string { cret := xPrintSettingsGetMediaType(x.GoPointer()) return cret } var xPrintSettingsGetNCopies func(uintptr) int // Gets the value of %GTK_PRINT_SETTINGS_N_COPIES. func (x *PrintSettings) GetNCopies() int { cret := xPrintSettingsGetNCopies(x.GoPointer()) return cret } var xPrintSettingsGetNumberUp func(uintptr) int // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP. func (x *PrintSettings) GetNumberUp() int { cret := xPrintSettingsGetNumberUp(x.GoPointer()) return cret } var xPrintSettingsGetNumberUpLayout func(uintptr) NumberUpLayout // Gets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT. func (x *PrintSettings) GetNumberUpLayout() NumberUpLayout { cret := xPrintSettingsGetNumberUpLayout(x.GoPointer()) return cret } var xPrintSettingsGetOrientation func(uintptr) PageOrientation // Get the value of %GTK_PRINT_SETTINGS_ORIENTATION, // converted to a `GtkPageOrientation`. func (x *PrintSettings) GetOrientation() PageOrientation { cret := xPrintSettingsGetOrientation(x.GoPointer()) return cret } var xPrintSettingsGetOutputBin func(uintptr) string // Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN. func (x *PrintSettings) GetOutputBin() string { cret := xPrintSettingsGetOutputBin(x.GoPointer()) return cret } var xPrintSettingsGetPageRanges func(uintptr, *int) uintptr // Gets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES. func (x *PrintSettings) GetPageRanges(NumRangesVar *int) uintptr { cret := xPrintSettingsGetPageRanges(x.GoPointer(), NumRangesVar) return cret } var xPrintSettingsGetPageSet func(uintptr) PageSet // Gets the value of %GTK_PRINT_SETTINGS_PAGE_SET. func (x *PrintSettings) GetPageSet() PageSet { cret := xPrintSettingsGetPageSet(x.GoPointer()) return cret } var xPrintSettingsGetPaperHeight func(uintptr, Unit) float64 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT, // converted to @unit. func (x *PrintSettings) GetPaperHeight(UnitVar Unit) float64 { cret := xPrintSettingsGetPaperHeight(x.GoPointer(), UnitVar) return cret } var xPrintSettingsGetPaperSize func(uintptr) *PaperSize // Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, // converted to a `GtkPaperSize`. func (x *PrintSettings) GetPaperSize() *PaperSize { cret := xPrintSettingsGetPaperSize(x.GoPointer()) return cret } var xPrintSettingsGetPaperWidth func(uintptr, Unit) float64 // Gets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH, // converted to @unit. func (x *PrintSettings) GetPaperWidth(UnitVar Unit) float64 { cret := xPrintSettingsGetPaperWidth(x.GoPointer(), UnitVar) return cret } var xPrintSettingsGetPrintPages func(uintptr) PrintPages // Gets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES. func (x *PrintSettings) GetPrintPages() PrintPages { cret := xPrintSettingsGetPrintPages(x.GoPointer()) return cret } var xPrintSettingsGetPrinter func(uintptr) string // Convenience function to obtain the value of // %GTK_PRINT_SETTINGS_PRINTER. func (x *PrintSettings) GetPrinter() string { cret := xPrintSettingsGetPrinter(x.GoPointer()) return cret } var xPrintSettingsGetPrinterLpi func(uintptr) float64 // Gets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI. func (x *PrintSettings) GetPrinterLpi() float64 { cret := xPrintSettingsGetPrinterLpi(x.GoPointer()) return cret } var xPrintSettingsGetQuality func(uintptr) PrintQuality // Gets the value of %GTK_PRINT_SETTINGS_QUALITY. func (x *PrintSettings) GetQuality() PrintQuality { cret := xPrintSettingsGetQuality(x.GoPointer()) return cret } var xPrintSettingsGetResolution func(uintptr) int // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION. func (x *PrintSettings) GetResolution() int { cret := xPrintSettingsGetResolution(x.GoPointer()) return cret } var xPrintSettingsGetResolutionX func(uintptr) int // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_X. func (x *PrintSettings) GetResolutionX() int { cret := xPrintSettingsGetResolutionX(x.GoPointer()) return cret } var xPrintSettingsGetResolutionY func(uintptr) int // Gets the value of %GTK_PRINT_SETTINGS_RESOLUTION_Y. func (x *PrintSettings) GetResolutionY() int { cret := xPrintSettingsGetResolutionY(x.GoPointer()) return cret } var xPrintSettingsGetReverse func(uintptr) bool // Gets the value of %GTK_PRINT_SETTINGS_REVERSE. func (x *PrintSettings) GetReverse() bool { cret := xPrintSettingsGetReverse(x.GoPointer()) return cret } var xPrintSettingsGetScale func(uintptr) float64 // Gets the value of %GTK_PRINT_SETTINGS_SCALE. func (x *PrintSettings) GetScale() float64 { cret := xPrintSettingsGetScale(x.GoPointer()) return cret } var xPrintSettingsGetUseColor func(uintptr) bool // Gets the value of %GTK_PRINT_SETTINGS_USE_COLOR. func (x *PrintSettings) GetUseColor() bool { cret := xPrintSettingsGetUseColor(x.GoPointer()) return cret } var xPrintSettingsHasKey func(uintptr, string) bool // Returns %TRUE, if a value is associated with @key. func (x *PrintSettings) HasKey(KeyVar string) bool { cret := xPrintSettingsHasKey(x.GoPointer(), KeyVar) return cret } var xPrintSettingsLoadFile func(uintptr, string, **glib.Error) bool // 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]. func (x *PrintSettings) LoadFile(FileNameVar string) (bool, error) { var cerr *glib.Error cret := xPrintSettingsLoadFile(x.GoPointer(), FileNameVar, &cerr) if cerr == nil { return cret, nil } return cret, cerr } var xPrintSettingsLoadKeyFile func(uintptr, *glib.KeyFile, uintptr, **glib.Error) bool // 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`. func (x *PrintSettings) LoadKeyFile(KeyFileVar *glib.KeyFile, GroupNameVar *string) (bool, error) { var cerr *glib.Error GroupNameVarPtr := core.GStrdupNullable(GroupNameVar) defer core.GFreeNullable(GroupNameVarPtr) cret := xPrintSettingsLoadKeyFile(x.GoPointer(), KeyFileVar, GroupNameVarPtr, &cerr) if cerr == nil { return cret, nil } return cret, cerr } var xPrintSettingsSet func(uintptr, string, uintptr) // Associates @value with @key. func (x *PrintSettings) Set(KeyVar string, ValueVar *string) { ValueVarPtr := core.GStrdupNullable(ValueVar) defer core.GFreeNullable(ValueVarPtr) xPrintSettingsSet(x.GoPointer(), KeyVar, ValueVarPtr) } var xPrintSettingsSetBool func(uintptr, string, bool) // Sets @key to a boolean value. func (x *PrintSettings) SetBool(KeyVar string, ValueVar bool) { xPrintSettingsSetBool(x.GoPointer(), KeyVar, ValueVar) } var xPrintSettingsSetCollate func(uintptr, bool) // Sets the value of %GTK_PRINT_SETTINGS_COLLATE. func (x *PrintSettings) SetCollate(CollateVar bool) { xPrintSettingsSetCollate(x.GoPointer(), CollateVar) } var xPrintSettingsSetDefaultSource func(uintptr, string) // Sets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE. func (x *PrintSettings) SetDefaultSource(DefaultSourceVar string) { xPrintSettingsSetDefaultSource(x.GoPointer(), DefaultSourceVar) } var xPrintSettingsSetDither func(uintptr, string) // Sets the value of %GTK_PRINT_SETTINGS_DITHER. func (x *PrintSettings) SetDither(DitherVar string) { xPrintSettingsSetDither(x.GoPointer(), DitherVar) } var xPrintSettingsSetDouble func(uintptr, string, float64) // Sets @key to a double value. func (x *PrintSettings) SetDouble(KeyVar string, ValueVar float64) { xPrintSettingsSetDouble(x.GoPointer(), KeyVar, ValueVar) } var xPrintSettingsSetDuplex func(uintptr, PrintDuplex) // Sets the value of %GTK_PRINT_SETTINGS_DUPLEX. func (x *PrintSettings) SetDuplex(DuplexVar PrintDuplex) { xPrintSettingsSetDuplex(x.GoPointer(), DuplexVar) } var xPrintSettingsSetFinishings func(uintptr, string) // Sets the value of %GTK_PRINT_SETTINGS_FINISHINGS. func (x *PrintSettings) SetFinishings(FinishingsVar string) { xPrintSettingsSetFinishings(x.GoPointer(), FinishingsVar) } var xPrintSettingsSetInt func(uintptr, string, int) // Sets @key to an integer value. func (x *PrintSettings) SetInt(KeyVar string, ValueVar int) { xPrintSettingsSetInt(x.GoPointer(), KeyVar, ValueVar) } var xPrintSettingsSetLength func(uintptr, string, float64, Unit) // Associates a length in units of @unit with @key. func (x *PrintSettings) SetLength(KeyVar string, ValueVar float64, UnitVar Unit) { xPrintSettingsSetLength(x.GoPointer(), KeyVar, ValueVar, UnitVar) } var xPrintSettingsSetMediaType func(uintptr, string) // Sets the value of %GTK_PRINT_SETTINGS_MEDIA_TYPE. // // The set of media types is defined in PWG 5101.1-2002 PWG. func (x *PrintSettings) SetMediaType(MediaTypeVar string) { xPrintSettingsSetMediaType(x.GoPointer(), MediaTypeVar) } var xPrintSettingsSetNCopies func(uintptr, int) // Sets the value of %GTK_PRINT_SETTINGS_N_COPIES. func (x *PrintSettings) SetNCopies(NumCopiesVar int) { xPrintSettingsSetNCopies(x.GoPointer(), NumCopiesVar) } var xPrintSettingsSetNumberUp func(uintptr, int) // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP. func (x *PrintSettings) SetNumberUp(NumberUpVar int) { xPrintSettingsSetNumberUp(x.GoPointer(), NumberUpVar) } var xPrintSettingsSetNumberUpLayout func(uintptr, NumberUpLayout) // Sets the value of %GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT. func (x *PrintSettings) SetNumberUpLayout(NumberUpLayoutVar NumberUpLayout) { xPrintSettingsSetNumberUpLayout(x.GoPointer(), NumberUpLayoutVar) } var xPrintSettingsSetOrientation func(uintptr, PageOrientation) // Sets the value of %GTK_PRINT_SETTINGS_ORIENTATION. func (x *PrintSettings) SetOrientation(OrientationVar PageOrientation) { xPrintSettingsSetOrientation(x.GoPointer(), OrientationVar) } var xPrintSettingsSetOutputBin func(uintptr, string) // Sets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN. func (x *PrintSettings) SetOutputBin(OutputBinVar string) { xPrintSettingsSetOutputBin(x.GoPointer(), OutputBinVar) } var xPrintSettingsSetPageRanges func(uintptr, []PageRange, int) // Sets the value of %GTK_PRINT_SETTINGS_PAGE_RANGES. func (x *PrintSettings) SetPageRanges(PageRangesVar []PageRange, NumRangesVar int) { xPrintSettingsSetPageRanges(x.GoPointer(), PageRangesVar, NumRangesVar) } var xPrintSettingsSetPageSet func(uintptr, PageSet) // Sets the value of %GTK_PRINT_SETTINGS_PAGE_SET. func (x *PrintSettings) SetPageSet(PageSetVar PageSet) { xPrintSettingsSetPageSet(x.GoPointer(), PageSetVar) } var xPrintSettingsSetPaperHeight func(uintptr, float64, Unit) // Sets the value of %GTK_PRINT_SETTINGS_PAPER_HEIGHT. func (x *PrintSettings) SetPaperHeight(HeightVar float64, UnitVar Unit) { xPrintSettingsSetPaperHeight(x.GoPointer(), HeightVar, UnitVar) } var xPrintSettingsSetPaperSize func(uintptr, *PaperSize) // Sets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT, // %GTK_PRINT_SETTINGS_PAPER_WIDTH and // %GTK_PRINT_SETTINGS_PAPER_HEIGHT. func (x *PrintSettings) SetPaperSize(PaperSizeVar *PaperSize) { xPrintSettingsSetPaperSize(x.GoPointer(), PaperSizeVar) } var xPrintSettingsSetPaperWidth func(uintptr, float64, Unit) // Sets the value of %GTK_PRINT_SETTINGS_PAPER_WIDTH. func (x *PrintSettings) SetPaperWidth(WidthVar float64, UnitVar Unit) { xPrintSettingsSetPaperWidth(x.GoPointer(), WidthVar, UnitVar) } var xPrintSettingsSetPrintPages func(uintptr, PrintPages) // Sets the value of %GTK_PRINT_SETTINGS_PRINT_PAGES. func (x *PrintSettings) SetPrintPages(PagesVar PrintPages) { xPrintSettingsSetPrintPages(x.GoPointer(), PagesVar) } var xPrintSettingsSetPrinter func(uintptr, string) // Convenience function to set %GTK_PRINT_SETTINGS_PRINTER // to @printer. func (x *PrintSettings) SetPrinter(PrinterVar string) { xPrintSettingsSetPrinter(x.GoPointer(), PrinterVar) } var xPrintSettingsSetPrinterLpi func(uintptr, float64) // Sets the value of %GTK_PRINT_SETTINGS_PRINTER_LPI. func (x *PrintSettings) SetPrinterLpi(LpiVar float64) { xPrintSettingsSetPrinterLpi(x.GoPointer(), LpiVar) } var xPrintSettingsSetQuality func(uintptr, PrintQuality) // Sets the value of %GTK_PRINT_SETTINGS_QUALITY. func (x *PrintSettings) SetQuality(QualityVar PrintQuality) { xPrintSettingsSetQuality(x.GoPointer(), QualityVar) } var xPrintSettingsSetResolution func(uintptr, int) // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, // %GTK_PRINT_SETTINGS_RESOLUTION_X and // %GTK_PRINT_SETTINGS_RESOLUTION_Y. func (x *PrintSettings) SetResolution(ResolutionVar int) { xPrintSettingsSetResolution(x.GoPointer(), ResolutionVar) } var xPrintSettingsSetResolutionXy func(uintptr, int, int) // Sets the values of %GTK_PRINT_SETTINGS_RESOLUTION, // %GTK_PRINT_SETTINGS_RESOLUTION_X and // %GTK_PRINT_SETTINGS_RESOLUTION_Y. func (x *PrintSettings) SetResolutionXy(ResolutionXVar int, ResolutionYVar int) { xPrintSettingsSetResolutionXy(x.GoPointer(), ResolutionXVar, ResolutionYVar) } var xPrintSettingsSetReverse func(uintptr, bool) // Sets the value of %GTK_PRINT_SETTINGS_REVERSE. func (x *PrintSettings) SetReverse(ReverseVar bool) { xPrintSettingsSetReverse(x.GoPointer(), ReverseVar) } var xPrintSettingsSetScale func(uintptr, float64) // Sets the value of %GTK_PRINT_SETTINGS_SCALE. func (x *PrintSettings) SetScale(ScaleVar float64) { xPrintSettingsSetScale(x.GoPointer(), ScaleVar) } var xPrintSettingsSetUseColor func(uintptr, bool) // Sets the value of %GTK_PRINT_SETTINGS_USE_COLOR. func (x *PrintSettings) SetUseColor(UseColorVar bool) { xPrintSettingsSetUseColor(x.GoPointer(), UseColorVar) } var xPrintSettingsToFile func(uintptr, string, **glib.Error) bool // 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`. func (x *PrintSettings) ToFile(FileNameVar string) (bool, error) { var cerr *glib.Error cret := xPrintSettingsToFile(x.GoPointer(), FileNameVar, &cerr) if cerr == nil { return cret, nil } return cret, cerr } var xPrintSettingsToGvariant func(uintptr) *glib.Variant // Serialize print settings to an a{sv} variant. func (x *PrintSettings) ToGvariant() *glib.Variant { cret := xPrintSettingsToGvariant(x.GoPointer()) return cret } var xPrintSettingsToKeyFile func(uintptr, *glib.KeyFile, uintptr) // This function adds the print settings from @settings to @key_file. func (x *PrintSettings) ToKeyFile(KeyFileVar *glib.KeyFile, GroupNameVar *string) { GroupNameVarPtr := core.GStrdupNullable(GroupNameVar) defer core.GFreeNullable(GroupNameVarPtr) xPrintSettingsToKeyFile(x.GoPointer(), KeyFileVar, GroupNameVarPtr) } var xPrintSettingsUnset func(uintptr, string) // Removes any value associated with @key. // // This has the same effect as setting the value to %NULL. func (x *PrintSettings) Unset(KeyVar string) { xPrintSettingsUnset(x.GoPointer(), KeyVar) } func (c *PrintSettings) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *PrintSettings) SetGoPointer(ptr uintptr) { c.Ptr = ptr } func init() { core.SetPackageName("GTK", "gtk4") core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"}) var libs []uintptr for _, libPath := range core.GetPaths("GTK") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xPrintSettingsGLibType, libs, "gtk_print_settings_get_type") core.PuregoSafeRegister(&xNewPrintSettings, libs, "gtk_print_settings_new") core.PuregoSafeRegister(&xNewPrintSettingsFromFile, libs, "gtk_print_settings_new_from_file") core.PuregoSafeRegister(&xNewPrintSettingsFromGvariant, libs, "gtk_print_settings_new_from_gvariant") core.PuregoSafeRegister(&xNewPrintSettingsFromKeyFile, libs, "gtk_print_settings_new_from_key_file") core.PuregoSafeRegister(&xPrintSettingsCopy, libs, "gtk_print_settings_copy") core.PuregoSafeRegister(&xPrintSettingsForeach, libs, "gtk_print_settings_foreach") core.PuregoSafeRegister(&xPrintSettingsGet, libs, "gtk_print_settings_get") core.PuregoSafeRegister(&xPrintSettingsGetBool, libs, "gtk_print_settings_get_bool") core.PuregoSafeRegister(&xPrintSettingsGetCollate, libs, "gtk_print_settings_get_collate") core.PuregoSafeRegister(&xPrintSettingsGetDefaultSource, libs, "gtk_print_settings_get_default_source") core.PuregoSafeRegister(&xPrintSettingsGetDither, libs, "gtk_print_settings_get_dither") core.PuregoSafeRegister(&xPrintSettingsGetDouble, libs, "gtk_print_settings_get_double") core.PuregoSafeRegister(&xPrintSettingsGetDoubleWithDefault, libs, "gtk_print_settings_get_double_with_default") core.PuregoSafeRegister(&xPrintSettingsGetDuplex, libs, "gtk_print_settings_get_duplex") core.PuregoSafeRegister(&xPrintSettingsGetFinishings, libs, "gtk_print_settings_get_finishings") core.PuregoSafeRegister(&xPrintSettingsGetInt, libs, "gtk_print_settings_get_int") core.PuregoSafeRegister(&xPrintSettingsGetIntWithDefault, libs, "gtk_print_settings_get_int_with_default") core.PuregoSafeRegister(&xPrintSettingsGetLength, libs, "gtk_print_settings_get_length") core.PuregoSafeRegister(&xPrintSettingsGetMediaType, libs, "gtk_print_settings_get_media_type") core.PuregoSafeRegister(&xPrintSettingsGetNCopies, libs, "gtk_print_settings_get_n_copies") core.PuregoSafeRegister(&xPrintSettingsGetNumberUp, libs, "gtk_print_settings_get_number_up") core.PuregoSafeRegister(&xPrintSettingsGetNumberUpLayout, libs, "gtk_print_settings_get_number_up_layout") core.PuregoSafeRegister(&xPrintSettingsGetOrientation, libs, "gtk_print_settings_get_orientation") core.PuregoSafeRegister(&xPrintSettingsGetOutputBin, libs, "gtk_print_settings_get_output_bin") core.PuregoSafeRegister(&xPrintSettingsGetPageRanges, libs, "gtk_print_settings_get_page_ranges") core.PuregoSafeRegister(&xPrintSettingsGetPageSet, libs, "gtk_print_settings_get_page_set") core.PuregoSafeRegister(&xPrintSettingsGetPaperHeight, libs, "gtk_print_settings_get_paper_height") core.PuregoSafeRegister(&xPrintSettingsGetPaperSize, libs, "gtk_print_settings_get_paper_size") core.PuregoSafeRegister(&xPrintSettingsGetPaperWidth, libs, "gtk_print_settings_get_paper_width") core.PuregoSafeRegister(&xPrintSettingsGetPrintPages, libs, "gtk_print_settings_get_print_pages") core.PuregoSafeRegister(&xPrintSettingsGetPrinter, libs, "gtk_print_settings_get_printer") core.PuregoSafeRegister(&xPrintSettingsGetPrinterLpi, libs, "gtk_print_settings_get_printer_lpi") core.PuregoSafeRegister(&xPrintSettingsGetQuality, libs, "gtk_print_settings_get_quality") core.PuregoSafeRegister(&xPrintSettingsGetResolution, libs, "gtk_print_settings_get_resolution") core.PuregoSafeRegister(&xPrintSettingsGetResolutionX, libs, "gtk_print_settings_get_resolution_x") core.PuregoSafeRegister(&xPrintSettingsGetResolutionY, libs, "gtk_print_settings_get_resolution_y") core.PuregoSafeRegister(&xPrintSettingsGetReverse, libs, "gtk_print_settings_get_reverse") core.PuregoSafeRegister(&xPrintSettingsGetScale, libs, "gtk_print_settings_get_scale") core.PuregoSafeRegister(&xPrintSettingsGetUseColor, libs, "gtk_print_settings_get_use_color") core.PuregoSafeRegister(&xPrintSettingsHasKey, libs, "gtk_print_settings_has_key") core.PuregoSafeRegister(&xPrintSettingsLoadFile, libs, "gtk_print_settings_load_file") core.PuregoSafeRegister(&xPrintSettingsLoadKeyFile, libs, "gtk_print_settings_load_key_file") core.PuregoSafeRegister(&xPrintSettingsSet, libs, "gtk_print_settings_set") core.PuregoSafeRegister(&xPrintSettingsSetBool, libs, "gtk_print_settings_set_bool") core.PuregoSafeRegister(&xPrintSettingsSetCollate, libs, "gtk_print_settings_set_collate") core.PuregoSafeRegister(&xPrintSettingsSetDefaultSource, libs, "gtk_print_settings_set_default_source") core.PuregoSafeRegister(&xPrintSettingsSetDither, libs, "gtk_print_settings_set_dither") core.PuregoSafeRegister(&xPrintSettingsSetDouble, libs, "gtk_print_settings_set_double") core.PuregoSafeRegister(&xPrintSettingsSetDuplex, libs, "gtk_print_settings_set_duplex") core.PuregoSafeRegister(&xPrintSettingsSetFinishings, libs, "gtk_print_settings_set_finishings") core.PuregoSafeRegister(&xPrintSettingsSetInt, libs, "gtk_print_settings_set_int") core.PuregoSafeRegister(&xPrintSettingsSetLength, libs, "gtk_print_settings_set_length") core.PuregoSafeRegister(&xPrintSettingsSetMediaType, libs, "gtk_print_settings_set_media_type") core.PuregoSafeRegister(&xPrintSettingsSetNCopies, libs, "gtk_print_settings_set_n_copies") core.PuregoSafeRegister(&xPrintSettingsSetNumberUp, libs, "gtk_print_settings_set_number_up") core.PuregoSafeRegister(&xPrintSettingsSetNumberUpLayout, libs, "gtk_print_settings_set_number_up_layout") core.PuregoSafeRegister(&xPrintSettingsSetOrientation, libs, "gtk_print_settings_set_orientation") core.PuregoSafeRegister(&xPrintSettingsSetOutputBin, libs, "gtk_print_settings_set_output_bin") core.PuregoSafeRegister(&xPrintSettingsSetPageRanges, libs, "gtk_print_settings_set_page_ranges") core.PuregoSafeRegister(&xPrintSettingsSetPageSet, libs, "gtk_print_settings_set_page_set") core.PuregoSafeRegister(&xPrintSettingsSetPaperHeight, libs, "gtk_print_settings_set_paper_height") core.PuregoSafeRegister(&xPrintSettingsSetPaperSize, libs, "gtk_print_settings_set_paper_size") core.PuregoSafeRegister(&xPrintSettingsSetPaperWidth, libs, "gtk_print_settings_set_paper_width") core.PuregoSafeRegister(&xPrintSettingsSetPrintPages, libs, "gtk_print_settings_set_print_pages") core.PuregoSafeRegister(&xPrintSettingsSetPrinter, libs, "gtk_print_settings_set_printer") core.PuregoSafeRegister(&xPrintSettingsSetPrinterLpi, libs, "gtk_print_settings_set_printer_lpi") core.PuregoSafeRegister(&xPrintSettingsSetQuality, libs, "gtk_print_settings_set_quality") core.PuregoSafeRegister(&xPrintSettingsSetResolution, libs, "gtk_print_settings_set_resolution") core.PuregoSafeRegister(&xPrintSettingsSetResolutionXy, libs, "gtk_print_settings_set_resolution_xy") core.PuregoSafeRegister(&xPrintSettingsSetReverse, libs, "gtk_print_settings_set_reverse") core.PuregoSafeRegister(&xPrintSettingsSetScale, libs, "gtk_print_settings_set_scale") core.PuregoSafeRegister(&xPrintSettingsSetUseColor, libs, "gtk_print_settings_set_use_color") core.PuregoSafeRegister(&xPrintSettingsToFile, libs, "gtk_print_settings_to_file") core.PuregoSafeRegister(&xPrintSettingsToGvariant, libs, "gtk_print_settings_to_gvariant") core.PuregoSafeRegister(&xPrintSettingsToKeyFile, libs, "gtk_print_settings_to_key_file") core.PuregoSafeRegister(&xPrintSettingsUnset, libs, "gtk_print_settings_unset") }