1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5 "github.com/ebitengine/purego"
6
7 "github.com/bnema/puregotk/pkg/core"
8 "github.com/bnema/puregotk/v4/gdk"
9 "github.com/bnema/puregotk/v4/gobject"
10 "github.com/bnema/puregotk/v4/gobject/types"
11 "github.com/bnema/puregotk/v4/gsk"
12)
13
14// A print dialog for platforms which don’t provide a native
15// print dialog, like Unix.
16//
17// <picture>
18//
19// <source srcset="printdialog-dark.png" media="(prefers-color-scheme: dark)">
20// <img alt="An example GtkPrintUnixDialog" src="printdialog.png">
21//
22// </picture>
23//
24// It can be used very much like any other GTK dialog, at the cost of
25// the portability offered by the high-level printing API with
26// [class@Gtk.PrintOperation].
27//
28// In order to print something with `GtkPrintUnixDialog`, you need to
29// use [method@Gtk.PrintUnixDialog.get_selected_printer] to obtain a
30// [class@Gtk.Printer] object and use it to construct a [class@Gtk.PrintJob]
31// using [ctor@Gtk.PrintJob.new].
32//
33// `GtkPrintUnixDialog` uses the following response values:
34//
35// - %GTK_RESPONSE_OK: for the “Print” button
36// - %GTK_RESPONSE_APPLY: for the “Preview” button
37// - %GTK_RESPONSE_CANCEL: for the “Cancel” button
38//
39// # GtkPrintUnixDialog as GtkBuildable
40//
41// The `GtkPrintUnixDialog` implementation of the `GtkBuildable` interface
42// exposes its @notebook internal children with the name “notebook”.
43//
44// An example of a `GtkPrintUnixDialog` UI definition fragment:
45//
46// ```xml
47// <object class="GtkPrintUnixDialog" id="dialog1">
48//
49// <child internal-child="notebook">
50// <object class="GtkNotebook" id="notebook">
51// <child>
52// <object type="GtkNotebookPage">
53// <property name="tab_expand">False</property>
54// <property name="tab_fill">False</property>
55// <property name="tab">
56// <object class="GtkLabel" id="tablabel">
57// <property name="label">Tab label</property>
58// </object>
59// </property>
60// <property name="child">
61// <object class="GtkLabel" id="tabcontent">
62// <property name="label">Content on notebook tab</property>
63// </object>
64// </property>
65// </object>
66// </child>
67// </object>
68// </child>
69//
70// </object>
71// ```
72//
73// # CSS nodes
74//
75// `GtkPrintUnixDialog` has a single CSS node with name window. The style classes
76// dialog and print are added.
77type PrintUnixDialog struct {
78 Dialog
79}
80
81var xPrintUnixDialogGLibType func() types.GType
82
83func PrintUnixDialogGLibType() types.GType {
84 return xPrintUnixDialogGLibType()
85}
86
87func PrintUnixDialogNewFromInternalPtr(ptr uintptr) *PrintUnixDialog {
88 cls := &PrintUnixDialog{}
89 cls.Ptr = ptr
90 return cls
91}
92
93var xNewPrintUnixDialog func(uintptr, uintptr) uintptr
94
95// Creates a new `GtkPrintUnixDialog`.
96func NewPrintUnixDialog(TitleVar *string, ParentVar *Window) *PrintUnixDialog {
97 var cls *PrintUnixDialog
98
99 TitleVarPtr := core.GStrdupNullable(TitleVar)
100 defer core.GFreeNullable(TitleVarPtr)
101
102 cret := xNewPrintUnixDialog(TitleVarPtr, ParentVar.GoPointer())
103
104 if cret == 0 {
105 return nil
106 }
107 gobject.IncreaseRef(cret)
108 cls = &PrintUnixDialog{}
109 cls.Ptr = cret
110 return cls
111}
112
113var xPrintUnixDialogAddCustomTab func(uintptr, uintptr, uintptr)
114
115// Adds a custom tab to the print dialog.
116func (x *PrintUnixDialog) AddCustomTab(ChildVar *Widget, TabLabelVar *Widget) {
117
118 xPrintUnixDialogAddCustomTab(x.GoPointer(), ChildVar.GoPointer(), TabLabelVar.GoPointer())
119
120}
121
122var xPrintUnixDialogGetCurrentPage func(uintptr) int
123
124// Gets the current page of the `GtkPrintUnixDialog`.
125func (x *PrintUnixDialog) GetCurrentPage() int {
126
127 cret := xPrintUnixDialogGetCurrentPage(x.GoPointer())
128 return cret
129}
130
131var xPrintUnixDialogGetEmbedPageSetup func(uintptr) bool
132
133// Gets whether to embed the page setup.
134func (x *PrintUnixDialog) GetEmbedPageSetup() bool {
135
136 cret := xPrintUnixDialogGetEmbedPageSetup(x.GoPointer())
137 return cret
138}
139
140var xPrintUnixDialogGetHasSelection func(uintptr) bool
141
142// Gets whether there is a selection.
143func (x *PrintUnixDialog) GetHasSelection() bool {
144
145 cret := xPrintUnixDialogGetHasSelection(x.GoPointer())
146 return cret
147}
148
149var xPrintUnixDialogGetManualCapabilities func(uintptr) PrintCapabilities
150
151// Gets the capabilities that have been set on this `GtkPrintUnixDialog`.
152func (x *PrintUnixDialog) GetManualCapabilities() PrintCapabilities {
153
154 cret := xPrintUnixDialogGetManualCapabilities(x.GoPointer())
155 return cret
156}
157
158var xPrintUnixDialogGetPageSetup func(uintptr) uintptr
159
160// Gets the page setup that is used by the `GtkPrintUnixDialog`.
161func (x *PrintUnixDialog) GetPageSetup() *PageSetup {
162 var cls *PageSetup
163
164 cret := xPrintUnixDialogGetPageSetup(x.GoPointer())
165
166 if cret == 0 {
167 return nil
168 }
169 gobject.IncreaseRef(cret)
170 cls = &PageSetup{}
171 cls.Ptr = cret
172 return cls
173}
174
175var xPrintUnixDialogGetPageSetupSet func(uintptr) bool
176
177// Gets whether a page setup was set by the user.
178func (x *PrintUnixDialog) GetPageSetupSet() bool {
179
180 cret := xPrintUnixDialogGetPageSetupSet(x.GoPointer())
181 return cret
182}
183
184var xPrintUnixDialogGetSelectedPrinter func(uintptr) uintptr
185
186// Gets the currently selected printer.
187func (x *PrintUnixDialog) GetSelectedPrinter() *Printer {
188 var cls *Printer
189
190 cret := xPrintUnixDialogGetSelectedPrinter(x.GoPointer())
191
192 if cret == 0 {
193 return nil
194 }
195 gobject.IncreaseRef(cret)
196 cls = &Printer{}
197 cls.Ptr = cret
198 return cls
199}
200
201var xPrintUnixDialogGetSettings func(uintptr) uintptr
202
203// Gets a new `GtkPrintSettings` object that represents the
204// current values in the print dialog.
205//
206// Note that this creates a new object, and you need to unref
207// it if don’t want to keep it.
208func (x *PrintUnixDialog) GetSettings() *PrintSettings {
209 var cls *PrintSettings
210
211 cret := xPrintUnixDialogGetSettings(x.GoPointer())
212
213 if cret == 0 {
214 return nil
215 }
216 cls = &PrintSettings{}
217 cls.Ptr = cret
218 return cls
219}
220
221var xPrintUnixDialogGetSupportSelection func(uintptr) bool
222
223// Gets whether the print dialog allows user to print a selection.
224func (x *PrintUnixDialog) GetSupportSelection() bool {
225
226 cret := xPrintUnixDialogGetSupportSelection(x.GoPointer())
227 return cret
228}
229
230var xPrintUnixDialogSetCurrentPage func(uintptr, int)
231
232// Sets the current page number.
233//
234// If @current_page is not -1, this enables the current page choice
235// for the range of pages to print.
236func (x *PrintUnixDialog) SetCurrentPage(CurrentPageVar int) {
237
238 xPrintUnixDialogSetCurrentPage(x.GoPointer(), CurrentPageVar)
239
240}
241
242var xPrintUnixDialogSetEmbedPageSetup func(uintptr, bool)
243
244// Embed page size combo box and orientation combo box into page setup page.
245func (x *PrintUnixDialog) SetEmbedPageSetup(EmbedVar bool) {
246
247 xPrintUnixDialogSetEmbedPageSetup(x.GoPointer(), EmbedVar)
248
249}
250
251var xPrintUnixDialogSetHasSelection func(uintptr, bool)
252
253// Sets whether a selection exists.
254func (x *PrintUnixDialog) SetHasSelection(HasSelectionVar bool) {
255
256 xPrintUnixDialogSetHasSelection(x.GoPointer(), HasSelectionVar)
257
258}
259
260var xPrintUnixDialogSetManualCapabilities func(uintptr, PrintCapabilities)
261
262// This lets you specify the printing capabilities your application
263// supports.
264//
265// For instance, if you can handle scaling the output then you pass
266// %GTK_PRINT_CAPABILITY_SCALE. If you don’t pass that, then the dialog
267// will only let you select the scale if the printing system automatically
268// handles scaling.
269func (x *PrintUnixDialog) SetManualCapabilities(CapabilitiesVar PrintCapabilities) {
270
271 xPrintUnixDialogSetManualCapabilities(x.GoPointer(), CapabilitiesVar)
272
273}
274
275var xPrintUnixDialogSetPageSetup func(uintptr, uintptr)
276
277// Sets the page setup of the `GtkPrintUnixDialog`.
278func (x *PrintUnixDialog) SetPageSetup(PageSetupVar *PageSetup) {
279
280 xPrintUnixDialogSetPageSetup(x.GoPointer(), PageSetupVar.GoPointer())
281
282}
283
284var xPrintUnixDialogSetSettings func(uintptr, uintptr)
285
286// Sets the `GtkPrintSettings` for the `GtkPrintUnixDialog`.
287//
288// Typically, this is used to restore saved print settings
289// from a previous print operation before the print dialog
290// is shown.
291func (x *PrintUnixDialog) SetSettings(SettingsVar *PrintSettings) {
292
293 xPrintUnixDialogSetSettings(x.GoPointer(), SettingsVar.GoPointer())
294
295}
296
297var xPrintUnixDialogSetSupportSelection func(uintptr, bool)
298
299// Sets whether the print dialog allows user to print a selection.
300func (x *PrintUnixDialog) SetSupportSelection(SupportSelectionVar bool) {
301
302 xPrintUnixDialogSetSupportSelection(x.GoPointer(), SupportSelectionVar)
303
304}
305
306func (c *PrintUnixDialog) GoPointer() uintptr {
307 if c == nil {
308 return 0
309 }
310 return c.Ptr
311}
312
313func (c *PrintUnixDialog) SetGoPointer(ptr uintptr) {
314 c.Ptr = ptr
315}
316
317// SetPropertyCurrentPage sets the "current-page" property.
318// The current page in the document.
319func (x *PrintUnixDialog) SetPropertyCurrentPage(value int) {
320 var v gobject.Value
321 v.Init(gobject.TypeIntVal)
322 v.SetInt(value)
323 x.SetProperty("current-page", &v)
324}
325
326// GetPropertyCurrentPage gets the "current-page" property.
327// The current page in the document.
328func (x *PrintUnixDialog) GetPropertyCurrentPage() int {
329 var v gobject.Value
330 x.GetProperty("current-page", &v)
331 return v.GetInt()
332}
333
334// SetPropertyEmbedPageSetup sets the "embed-page-setup" property.
335// %TRUE if the page setup controls are embedded.
336func (x *PrintUnixDialog) SetPropertyEmbedPageSetup(value bool) {
337 var v gobject.Value
338 v.Init(gobject.TypeBooleanVal)
339 v.SetBoolean(value)
340 x.SetProperty("embed-page-setup", &v)
341}
342
343// GetPropertyEmbedPageSetup gets the "embed-page-setup" property.
344// %TRUE if the page setup controls are embedded.
345func (x *PrintUnixDialog) GetPropertyEmbedPageSetup() bool {
346 var v gobject.Value
347 x.GetProperty("embed-page-setup", &v)
348 return v.GetBoolean()
349}
350
351// SetPropertyHasSelection sets the "has-selection" property.
352// Whether the application has a selection.
353func (x *PrintUnixDialog) SetPropertyHasSelection(value bool) {
354 var v gobject.Value
355 v.Init(gobject.TypeBooleanVal)
356 v.SetBoolean(value)
357 x.SetProperty("has-selection", &v)
358}
359
360// GetPropertyHasSelection gets the "has-selection" property.
361// Whether the application has a selection.
362func (x *PrintUnixDialog) GetPropertyHasSelection() bool {
363 var v gobject.Value
364 x.GetProperty("has-selection", &v)
365 return v.GetBoolean()
366}
367
368// SetPropertySupportSelection sets the "support-selection" property.
369// Whether the dialog supports selection.
370func (x *PrintUnixDialog) SetPropertySupportSelection(value bool) {
371 var v gobject.Value
372 v.Init(gobject.TypeBooleanVal)
373 v.SetBoolean(value)
374 x.SetProperty("support-selection", &v)
375}
376
377// GetPropertySupportSelection gets the "support-selection" property.
378// Whether the dialog supports selection.
379func (x *PrintUnixDialog) GetPropertySupportSelection() bool {
380 var v gobject.Value
381 x.GetProperty("support-selection", &v)
382 return v.GetBoolean()
383}
384
385// Requests the user's screen reader to announce the given message.
386//
387// This kind of notification is useful for messages that
388// either have only a visual representation or that are not
389// exposed visually at all, e.g. a notification about a
390// successful operation.
391//
392// Also, by using this API, you can ensure that the message
393// does not interrupts the user's current screen reader output.
394func (x *PrintUnixDialog) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
395
396 XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
397
398}
399
400// Retrieves the accessible parent for an accessible object.
401//
402// This function returns `NULL` for top level widgets.
403func (x *PrintUnixDialog) GetAccessibleParent() *AccessibleBase {
404 var cls *AccessibleBase
405
406 cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
407
408 if cret == 0 {
409 return nil
410 }
411 cls = &AccessibleBase{}
412 cls.Ptr = cret
413 return cls
414}
415
416// Retrieves the accessible role of an accessible object.
417func (x *PrintUnixDialog) GetAccessibleRole() AccessibleRole {
418
419 cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
420 return cret
421}
422
423// Retrieves the implementation for the given accessible object.
424func (x *PrintUnixDialog) GetAtContext() *ATContext {
425 var cls *ATContext
426
427 cret := XGtkAccessibleGetAtContext(x.GoPointer())
428
429 if cret == 0 {
430 return nil
431 }
432 cls = &ATContext{}
433 cls.Ptr = cret
434 return cls
435}
436
437// Queries the coordinates and dimensions of this accessible
438//
439// This functionality can be overridden by `GtkAccessible`
440// implementations, e.g. to get the bounds from an ignored
441// child widget.
442func (x *PrintUnixDialog) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
443
444 cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
445 return cret
446}
447
448// Retrieves the first accessible child of an accessible object.
449func (x *PrintUnixDialog) GetFirstAccessibleChild() *AccessibleBase {
450 var cls *AccessibleBase
451
452 cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
453
454 if cret == 0 {
455 return nil
456 }
457 cls = &AccessibleBase{}
458 cls.Ptr = cret
459 return cls
460}
461
462// Retrieves the next accessible sibling of an accessible object
463func (x *PrintUnixDialog) GetNextAccessibleSibling() *AccessibleBase {
464 var cls *AccessibleBase
465
466 cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
467
468 if cret == 0 {
469 return nil
470 }
471 cls = &AccessibleBase{}
472 cls.Ptr = cret
473 return cls
474}
475
476// Queries a platform state, such as focus.
477//
478// This functionality can be overridden by `GtkAccessible`
479// implementations, e.g. to get platform state from an ignored
480// child widget, as is the case for `GtkText` wrappers.
481func (x *PrintUnixDialog) GetPlatformState(StateVar AccessiblePlatformState) bool {
482
483 cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
484 return cret
485}
486
487// Resets the accessible property to its default value.
488func (x *PrintUnixDialog) ResetProperty(PropertyVar AccessibleProperty) {
489
490 XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
491
492}
493
494// Resets the accessible relation to its default value.
495func (x *PrintUnixDialog) ResetRelation(RelationVar AccessibleRelation) {
496
497 XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
498
499}
500
501// Resets the accessible state to its default value.
502func (x *PrintUnixDialog) ResetState(StateVar AccessibleState) {
503
504 XGtkAccessibleResetState(x.GoPointer(), StateVar)
505
506}
507
508// Sets the parent and sibling of an accessible object.
509//
510// This function is meant to be used by accessible implementations that are
511// not part of the widget hierarchy, and but act as a logical bridge between
512// widgets. For instance, if a widget creates an object that holds metadata
513// for each child, and you want that object to implement the `GtkAccessible`
514// interface, you will use this function to ensure that the parent of each
515// child widget is the metadata object, and the parent of each metadata
516// object is the container widget.
517func (x *PrintUnixDialog) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
518
519 XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
520
521}
522
523// Updates the next accessible sibling.
524//
525// That might be useful when a new child of a custom accessible
526// is created, and it needs to be linked to a previous child.
527func (x *PrintUnixDialog) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
528
529 XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
530
531}
532
533// Informs ATs that the platform state has changed.
534//
535// This function should be used by `GtkAccessible` implementations that
536// have a platform state but are not widgets. Widgets handle platform
537// states automatically.
538func (x *PrintUnixDialog) UpdatePlatformState(StateVar AccessiblePlatformState) {
539
540 XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
541
542}
543
544// Updates a list of accessible properties.
545//
546// See the [enum@Gtk.AccessibleProperty] documentation for the
547// value types of accessible properties.
548//
549// This function should be called by `GtkWidget` types whenever
550// an accessible property change must be communicated to assistive
551// technologies.
552//
553// Example:
554// ```c
555// value = gtk_adjustment_get_value (adjustment);
556// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
557//
558// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
559// -1);
560//
561// ```
562func (x *PrintUnixDialog) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
563
564 XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
565
566}
567
568// Updates an array of accessible properties.
569//
570// This function should be called by `GtkWidget` types whenever an accessible
571// property change must be communicated to assistive technologies.
572//
573// This function is meant to be used by language bindings.
574func (x *PrintUnixDialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
575
576 XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
577
578}
579
580// Updates a list of accessible relations.
581//
582// This function should be called by `GtkWidget` types whenever an accessible
583// relation change must be communicated to assistive technologies.
584//
585// If the [enum@Gtk.AccessibleRelation] requires a list of references,
586// you should pass each reference individually, followed by `NULL`, e.g.
587//
588// ```c
589// gtk_accessible_update_relation (accessible,
590//
591// GTK_ACCESSIBLE_RELATION_CONTROLS,
592// ref1, NULL,
593// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
594// ref1, ref2, ref3, NULL,
595// -1);
596//
597// ```
598func (x *PrintUnixDialog) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
599
600 XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
601
602}
603
604// Updates an array of accessible relations.
605//
606// This function should be called by `GtkWidget` types whenever an accessible
607// relation change must be communicated to assistive technologies.
608//
609// This function is meant to be used by language bindings.
610func (x *PrintUnixDialog) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
611
612 XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
613
614}
615
616// Updates a list of accessible states.
617//
618// See the [enum@Gtk.AccessibleState] documentation for the
619// value types of accessible states.
620//
621// This function should be called by `GtkWidget` types whenever
622// an accessible state change must be communicated to assistive
623// technologies.
624//
625// Example:
626//
627// ```c
628// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
629// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
630//
631// GTK_ACCESSIBLE_STATE_CHECKED, value,
632// -1);
633//
634// ```
635func (x *PrintUnixDialog) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
636
637 XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
638
639}
640
641// Updates an array of accessible states.
642//
643// This function should be called by `GtkWidget` types whenever an accessible
644// state change must be communicated to assistive technologies.
645//
646// This function is meant to be used by language bindings.
647func (x *PrintUnixDialog) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
648
649 XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
650
651}
652
653// Gets the ID of the @buildable object.
654//
655// `GtkBuilder` sets the name based on the ID attribute
656// of the `<object>` tag used to construct the @buildable.
657func (x *PrintUnixDialog) GetBuildableId() string {
658
659 cret := XGtkBuildableGetBuildableId(x.GoPointer())
660 return cret
661}
662
663// Returns the renderer that is used for this `GtkNative`.
664func (x *PrintUnixDialog) GetRenderer() *gsk.Renderer {
665 var cls *gsk.Renderer
666
667 cret := XGtkNativeGetRenderer(x.GoPointer())
668
669 if cret == 0 {
670 return nil
671 }
672 gobject.IncreaseRef(cret)
673 cls = &gsk.Renderer{}
674 cls.Ptr = cret
675 return cls
676}
677
678// Returns the surface of this `GtkNative`.
679func (x *PrintUnixDialog) GetSurface() *gdk.Surface {
680 var cls *gdk.Surface
681
682 cret := XGtkNativeGetSurface(x.GoPointer())
683
684 if cret == 0 {
685 return nil
686 }
687 gobject.IncreaseRef(cret)
688 cls = &gdk.Surface{}
689 cls.Ptr = cret
690 return cls
691}
692
693// Retrieves the surface transform of @self.
694//
695// This is the translation from @self's surface coordinates into
696// @self's widget coordinates.
697func (x *PrintUnixDialog) GetSurfaceTransform(XVar *float64, YVar *float64) {
698
699 XGtkNativeGetSurfaceTransform(x.GoPointer(), XVar, YVar)
700
701}
702
703// Realizes a `GtkNative`.
704//
705// This should only be used by subclasses.
706func (x *PrintUnixDialog) Realize() {
707
708 XGtkNativeRealize(x.GoPointer())
709
710}
711
712// Unrealizes a `GtkNative`.
713//
714// This should only be used by subclasses.
715func (x *PrintUnixDialog) Unrealize() {
716
717 XGtkNativeUnrealize(x.GoPointer())
718
719}
720
721// Returns the display that this `GtkRoot` is on.
722func (x *PrintUnixDialog) GetDisplay() *gdk.Display {
723 var cls *gdk.Display
724
725 cret := XGtkRootGetDisplay(x.GoPointer())
726
727 if cret == 0 {
728 return nil
729 }
730 gobject.IncreaseRef(cret)
731 cls = &gdk.Display{}
732 cls.Ptr = cret
733 return cls
734}
735
736// Retrieves the current focused widget within the root.
737//
738// Note that this is the widget that would have the focus
739// if the root is active; if the root is not focused then
740// `gtk_widget_has_focus (widget)` will be %FALSE for the
741// widget.
742func (x *PrintUnixDialog) GetFocus() *Widget {
743 var cls *Widget
744
745 cret := XGtkRootGetFocus(x.GoPointer())
746
747 if cret == 0 {
748 return nil
749 }
750 gobject.IncreaseRef(cret)
751 cls = &Widget{}
752 cls.Ptr = cret
753 return cls
754}
755
756// If @focus is not the current focus widget, and is focusable, sets
757// it as the focus widget for the root.
758//
759// If @focus is %NULL, unsets the focus widget for the root.
760//
761// To set the focus to a particular widget in the root, it is usually
762// more convenient to use [method@Gtk.Widget.grab_focus] instead of
763// this function.
764func (x *PrintUnixDialog) SetFocus(FocusVar *Widget) {
765
766 XGtkRootSetFocus(x.GoPointer(), FocusVar.GoPointer())
767
768}
769
770func init() {
771 core.SetPackageName("GTK", "gtk4")
772 core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
773 var libs []uintptr
774 for _, libPath := range core.GetPaths("GTK") {
775 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
776 if err != nil {
777 panic(err)
778 }
779 libs = append(libs, lib)
780 }
781
782 core.PuregoSafeRegister(&xPrintUnixDialogGLibType, libs, "gtk_print_unix_dialog_get_type")
783
784 core.PuregoSafeRegister(&xNewPrintUnixDialog, libs, "gtk_print_unix_dialog_new")
785
786 core.PuregoSafeRegister(&xPrintUnixDialogAddCustomTab, libs, "gtk_print_unix_dialog_add_custom_tab")
787 core.PuregoSafeRegister(&xPrintUnixDialogGetCurrentPage, libs, "gtk_print_unix_dialog_get_current_page")
788 core.PuregoSafeRegister(&xPrintUnixDialogGetEmbedPageSetup, libs, "gtk_print_unix_dialog_get_embed_page_setup")
789 core.PuregoSafeRegister(&xPrintUnixDialogGetHasSelection, libs, "gtk_print_unix_dialog_get_has_selection")
790 core.PuregoSafeRegister(&xPrintUnixDialogGetManualCapabilities, libs, "gtk_print_unix_dialog_get_manual_capabilities")
791 core.PuregoSafeRegister(&xPrintUnixDialogGetPageSetup, libs, "gtk_print_unix_dialog_get_page_setup")
792 core.PuregoSafeRegister(&xPrintUnixDialogGetPageSetupSet, libs, "gtk_print_unix_dialog_get_page_setup_set")
793 core.PuregoSafeRegister(&xPrintUnixDialogGetSelectedPrinter, libs, "gtk_print_unix_dialog_get_selected_printer")
794 core.PuregoSafeRegister(&xPrintUnixDialogGetSettings, libs, "gtk_print_unix_dialog_get_settings")
795 core.PuregoSafeRegister(&xPrintUnixDialogGetSupportSelection, libs, "gtk_print_unix_dialog_get_support_selection")
796 core.PuregoSafeRegister(&xPrintUnixDialogSetCurrentPage, libs, "gtk_print_unix_dialog_set_current_page")
797 core.PuregoSafeRegister(&xPrintUnixDialogSetEmbedPageSetup, libs, "gtk_print_unix_dialog_set_embed_page_setup")
798 core.PuregoSafeRegister(&xPrintUnixDialogSetHasSelection, libs, "gtk_print_unix_dialog_set_has_selection")
799 core.PuregoSafeRegister(&xPrintUnixDialogSetManualCapabilities, libs, "gtk_print_unix_dialog_set_manual_capabilities")
800 core.PuregoSafeRegister(&xPrintUnixDialogSetPageSetup, libs, "gtk_print_unix_dialog_set_page_setup")
801 core.PuregoSafeRegister(&xPrintUnixDialogSetSettings, libs, "gtk_print_unix_dialog_set_settings")
802 core.PuregoSafeRegister(&xPrintUnixDialogSetSupportSelection, libs, "gtk_print_unix_dialog_set_support_selection")
803
804}