1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5 "structs"
6 "unsafe"
7
8 "github.com/ebitengine/purego"
9
10 "github.com/bnema/puregotk/pkg/core"
11 "github.com/bnema/puregotk/v4/gdk"
12 "github.com/bnema/puregotk/v4/gio"
13 "github.com/bnema/puregotk/v4/glib"
14 "github.com/bnema/puregotk/v4/gobject"
15 "github.com/bnema/puregotk/v4/gobject/types"
16 "github.com/bnema/puregotk/v4/gsk"
17 "github.com/bnema/puregotk/v4/gtk"
18)
19
20type ApplicationWindowClass struct {
21 _ structs.HostLayout
22
23 ParentClass gtk.ApplicationWindowClass
24
25 Padding [4]uintptr
26}
27
28func (x *ApplicationWindowClass) GoPointer() uintptr {
29 return uintptr(unsafe.Pointer(x))
30}
31
32// A freeform application window.
33//
34// <picture>
35//
36// <source srcset="application-window-dark.png" media="(prefers-color-scheme: dark)">
37// <img src="application-window.png" alt="application-window">
38//
39// </picture>
40//
41// `AdwApplicationWindow` is a [class@Gtk.ApplicationWindow] subclass providing
42// the same features as [class@Window].
43//
44// See [class@Window] for details.
45//
46// Example of an `AdwApplicationWindow` UI definition:
47//
48// ```xml
49// <object class="AdwApplicationWindow">
50//
51// <property name="content">
52// <object class="AdwToolbarView">
53// <child type="top">
54// <object class="AdwHeaderBar"/>
55// </child>
56// <property name="content">
57// <!-- ... -->
58// </property>
59// </object>
60// </property>
61//
62// </object>
63// ```
64//
65// Using [property@Gtk.Application:menubar] is not supported and may result in
66// visual glitches.
67type ApplicationWindow struct {
68 gtk.ApplicationWindow
69}
70
71var xApplicationWindowGLibType func() types.GType
72
73func ApplicationWindowGLibType() types.GType {
74 return xApplicationWindowGLibType()
75}
76
77func ApplicationWindowNewFromInternalPtr(ptr uintptr) *ApplicationWindow {
78 cls := &ApplicationWindow{}
79 cls.Ptr = ptr
80 return cls
81}
82
83var xNewApplicationWindow func(uintptr) uintptr
84
85// Creates a new `AdwApplicationWindow` for @app.
86func NewApplicationWindow(AppVar *gtk.Application) *ApplicationWindow {
87 var cls *ApplicationWindow
88
89 cret := xNewApplicationWindow(AppVar.GoPointer())
90
91 if cret == 0 {
92 return nil
93 }
94 gobject.IncreaseRef(cret)
95 cls = &ApplicationWindow{}
96 cls.Ptr = cret
97 return cls
98}
99
100var xApplicationWindowAddBreakpoint func(uintptr, uintptr)
101
102// Adds @breakpoint to @self.
103func (x *ApplicationWindow) AddBreakpoint(BreakpointVar *Breakpoint) {
104
105 xApplicationWindowAddBreakpoint(x.GoPointer(), BreakpointVar.GoPointer())
106
107}
108
109var xApplicationWindowGetAdaptivePreview func(uintptr) bool
110
111// Gets whether adaptive preview for @self is currently open.
112func (x *ApplicationWindow) GetAdaptivePreview() bool {
113
114 cret := xApplicationWindowGetAdaptivePreview(x.GoPointer())
115 return cret
116}
117
118var xApplicationWindowGetContent func(uintptr) uintptr
119
120// Gets the content widget of @self.
121//
122// This method should always be used instead of [method@Gtk.Window.get_child].
123func (x *ApplicationWindow) GetContent() *gtk.Widget {
124 var cls *gtk.Widget
125
126 cret := xApplicationWindowGetContent(x.GoPointer())
127
128 if cret == 0 {
129 return nil
130 }
131 gobject.IncreaseRef(cret)
132 cls = >k.Widget{}
133 cls.Ptr = cret
134 return cls
135}
136
137var xApplicationWindowGetCurrentBreakpoint func(uintptr) uintptr
138
139// Gets the current breakpoint.
140func (x *ApplicationWindow) GetCurrentBreakpoint() *Breakpoint {
141 var cls *Breakpoint
142
143 cret := xApplicationWindowGetCurrentBreakpoint(x.GoPointer())
144
145 if cret == 0 {
146 return nil
147 }
148 gobject.IncreaseRef(cret)
149 cls = &Breakpoint{}
150 cls.Ptr = cret
151 return cls
152}
153
154var xApplicationWindowGetDialogs func(uintptr) uintptr
155
156// Returns a [iface@Gio.ListModel] that contains the open dialogs of @self.
157//
158// This can be used to keep an up-to-date view.
159func (x *ApplicationWindow) GetDialogs() *gio.ListModelBase {
160 var cls *gio.ListModelBase
161
162 cret := xApplicationWindowGetDialogs(x.GoPointer())
163
164 if cret == 0 {
165 return nil
166 }
167 cls = &gio.ListModelBase{}
168 cls.Ptr = cret
169 return cls
170}
171
172var xApplicationWindowGetVisibleDialog func(uintptr) uintptr
173
174// Returns the currently visible dialog in @self, if there's one.
175func (x *ApplicationWindow) GetVisibleDialog() *Dialog {
176 var cls *Dialog
177
178 cret := xApplicationWindowGetVisibleDialog(x.GoPointer())
179
180 if cret == 0 {
181 return nil
182 }
183 gobject.IncreaseRef(cret)
184 cls = &Dialog{}
185 cls.Ptr = cret
186 return cls
187}
188
189var xApplicationWindowSetAdaptivePreview func(uintptr, bool)
190
191// Sets whether adaptive preview for @self is currently open.
192//
193// Adaptive preview is a debugging tool used for testing the window
194// contents at specific screen sizes, simulating mobile environment.
195//
196// Adaptive preview can always be accessed from inspector. This function
197// allows applications to open it manually.
198//
199// Most applications should not use this function.
200func (x *ApplicationWindow) SetAdaptivePreview(AdaptivePreviewVar bool) {
201
202 xApplicationWindowSetAdaptivePreview(x.GoPointer(), AdaptivePreviewVar)
203
204}
205
206var xApplicationWindowSetContent func(uintptr, uintptr)
207
208// Sets the content widget of @self.
209//
210// This method should always be used instead of [method@Gtk.Window.set_child].
211func (x *ApplicationWindow) SetContent(ContentVar *gtk.Widget) {
212
213 xApplicationWindowSetContent(x.GoPointer(), ContentVar.GoPointer())
214
215}
216
217func (c *ApplicationWindow) GoPointer() uintptr {
218 if c == nil {
219 return 0
220 }
221 return c.Ptr
222}
223
224func (c *ApplicationWindow) SetGoPointer(ptr uintptr) {
225 c.Ptr = ptr
226}
227
228// SetPropertyAdaptivePreview sets the "adaptive-preview" property.
229// Whether adaptive preview is currently open.
230//
231// Adaptive preview is a debugging tool used for testing the window
232// contents at specific screen sizes, simulating mobile environment.
233//
234// Adaptive preview can always be accessed from inspector. This function
235// allows applications to open it manually.
236//
237// Most applications should not use this property.
238func (x *ApplicationWindow) SetPropertyAdaptivePreview(value bool) {
239 var v gobject.Value
240 v.Init(gobject.TypeBooleanVal)
241 v.SetBoolean(value)
242 x.SetProperty("adaptive-preview", &v)
243}
244
245// GetPropertyAdaptivePreview gets the "adaptive-preview" property.
246// Whether adaptive preview is currently open.
247//
248// Adaptive preview is a debugging tool used for testing the window
249// contents at specific screen sizes, simulating mobile environment.
250//
251// Adaptive preview can always be accessed from inspector. This function
252// allows applications to open it manually.
253//
254// Most applications should not use this property.
255func (x *ApplicationWindow) GetPropertyAdaptivePreview() bool {
256 var v gobject.Value
257 x.GetProperty("adaptive-preview", &v)
258 return v.GetBoolean()
259}
260
261// Emits the [signal@Gio.ActionGroup::action-added] signal on @action_group.
262//
263// This function should only be called by [type@Gio.ActionGroup] implementations.
264func (x *ApplicationWindow) ActionAdded(ActionNameVar string) {
265
266 gio.XGActionGroupActionAdded(x.GoPointer(), ActionNameVar)
267
268}
269
270// Emits the [signal@Gio.ActionGroup::action-enabled-changed] signal on @action_group.
271//
272// This function should only be called by [type@Gio.ActionGroup] implementations.
273func (x *ApplicationWindow) ActionEnabledChanged(ActionNameVar string, EnabledVar bool) {
274
275 gio.XGActionGroupActionEnabledChanged(x.GoPointer(), ActionNameVar, EnabledVar)
276
277}
278
279// Emits the [signal@Gio.ActionGroup::action-removed] signal on @action_group.
280//
281// This function should only be called by [type@Gio.ActionGroup] implementations.
282func (x *ApplicationWindow) ActionRemoved(ActionNameVar string) {
283
284 gio.XGActionGroupActionRemoved(x.GoPointer(), ActionNameVar)
285
286}
287
288// Emits the [signal@Gio.ActionGroup::action-state-changed] signal on @action_group.
289//
290// This function should only be called by [type@Gio.ActionGroup] implementations.
291func (x *ApplicationWindow) ActionStateChanged(ActionNameVar string, StateVar *glib.Variant) {
292
293 gio.XGActionGroupActionStateChanged(x.GoPointer(), ActionNameVar, StateVar)
294
295}
296
297// Activate the named action within @action_group.
298//
299// If the action is expecting a parameter, then the correct type of
300// parameter must be given as @parameter. If the action is expecting no
301// parameters then @parameter must be `NULL`. See
302// [method@Gio.ActionGroup.get_action_parameter_type].
303//
304// If the [type@Gio.ActionGroup] implementation supports asynchronous remote
305// activation over D-Bus, this call may return before the relevant
306// D-Bus traffic has been sent, or any replies have been received. In
307// order to block on such asynchronous activation calls,
308// [method@Gio.DBusConnection.flush] should be called prior to the code, which
309// depends on the result of the action activation. Without flushing
310// the D-Bus connection, there is no guarantee that the action would
311// have been activated.
312//
313// The following code which runs in a remote app instance, shows an
314// example of a ‘quit’ action being activated on the primary app
315// instance over D-Bus. Here [method@Gio.DBusConnection.flush] is called
316// before `exit()`. Without `g_dbus_connection_flush()`, the ‘quit’ action
317// may fail to be activated on the primary instance.
318//
319// ```c
320// // call ‘quit’ action on primary instance
321// g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
322//
323// // make sure the action is activated now
324// g_dbus_connection_flush (…);
325//
326// g_debug ("Application has been terminated. Exiting.");
327//
328// exit (0);
329// ```
330func (x *ApplicationWindow) ActivateAction(ActionNameVar string, ParameterVar *glib.Variant) {
331
332 gio.XGActionGroupActivateAction(x.GoPointer(), ActionNameVar, ParameterVar)
333
334}
335
336// Request for the state of the named action within @action_group to be
337// changed to @value.
338//
339// The action must be stateful and @value must be of the correct type.
340// See [method@Gio.ActionGroup.get_action_state_type].
341//
342// This call merely requests a change. The action may refuse to change
343// its state or may change its state to something other than @value.
344// See [method@Gio.ActionGroup.get_action_state_hint].
345//
346// If the @value GVariant is floating, it is consumed.
347func (x *ApplicationWindow) ChangeActionState(ActionNameVar string, ValueVar *glib.Variant) {
348
349 gio.XGActionGroupChangeActionState(x.GoPointer(), ActionNameVar, ValueVar)
350
351}
352
353// Checks if the named action within @action_group is currently enabled.
354//
355// An action must be enabled in order to be activated or in order to
356// have its state changed from outside callers.
357func (x *ApplicationWindow) GetActionEnabled(ActionNameVar string) bool {
358
359 cret := gio.XGActionGroupGetActionEnabled(x.GoPointer(), ActionNameVar)
360 return cret
361}
362
363// Queries the type of the parameter that must be given when activating
364// the named action within @action_group.
365//
366// When activating the action using [method@Gio.ActionGroup.activate_action],
367// the [type@GLib.Variant] given to that function must be of the type returned
368// by this function.
369//
370// In the case that this function returns `NULL`, you must not give any
371// [type@GLib.Variant], but `NULL` instead.
372//
373// The parameter type of a particular action will never change but it is
374// possible for an action to be removed and for a new action to be added
375// with the same name but a different parameter type.
376func (x *ApplicationWindow) GetActionParameterType(ActionNameVar string) *glib.VariantType {
377
378 cret := gio.XGActionGroupGetActionParameterType(x.GoPointer(), ActionNameVar)
379 return cret
380}
381
382// Queries the current state of the named action within @action_group.
383//
384// If the action is not stateful then `NULL` will be returned. If the
385// action is stateful then the type of the return value is the type
386// given by [method@Gio.ActionGroup.get_action_state_type].
387//
388// The return value (if non-`NULL`) should be freed with
389// [method@GLib.Variant.unref] when it is no longer required.
390func (x *ApplicationWindow) GetActionState(ActionNameVar string) *glib.Variant {
391
392 cret := gio.XGActionGroupGetActionState(x.GoPointer(), ActionNameVar)
393 return cret
394}
395
396// Requests a hint about the valid range of values for the state of the
397// named action within @action_group.
398//
399// If `NULL` is returned it either means that the action is not stateful
400// or that there is no hint about the valid range of values for the
401// state of the action.
402//
403// If a [type@GLib.Variant] array is returned then each item in the array is a
404// possible value for the state. If a [type@GLib.Variant] pair (ie: two-tuple) is
405// returned then the tuple specifies the inclusive lower and upper bound
406// of valid values for the state.
407//
408// In any case, the information is merely a hint. It may be possible to
409// have a state value outside of the hinted range and setting a value
410// within the range may fail.
411//
412// The return value (if non-`NULL`) should be freed with
413// [method@GLib.Variant.unref] when it is no longer required.
414func (x *ApplicationWindow) GetActionStateHint(ActionNameVar string) *glib.Variant {
415
416 cret := gio.XGActionGroupGetActionStateHint(x.GoPointer(), ActionNameVar)
417 return cret
418}
419
420// Queries the type of the state of the named action within
421// @action_group.
422//
423// If the action is stateful then this function returns the
424// [type@GLib.VariantType] of the state. All calls to
425// [method@Gio.ActionGroup.change_action_state] must give a [type@GLib.Variant] of this
426// type and [method@Gio.ActionGroup.get_action_state] will return a [type@GLib.Variant]
427// of the same type.
428//
429// If the action is not stateful then this function will return `NULL`.
430// In that case, [method@Gio.ActionGroup.get_action_state] will return `NULL`
431// and you must not call [method@Gio.ActionGroup.change_action_state].
432//
433// The state type of a particular action will never change but it is
434// possible for an action to be removed and for a new action to be added
435// with the same name but a different state type.
436func (x *ApplicationWindow) GetActionStateType(ActionNameVar string) *glib.VariantType {
437
438 cret := gio.XGActionGroupGetActionStateType(x.GoPointer(), ActionNameVar)
439 return cret
440}
441
442// Checks if the named action exists within @action_group.
443func (x *ApplicationWindow) HasAction(ActionNameVar string) bool {
444
445 cret := gio.XGActionGroupHasAction(x.GoPointer(), ActionNameVar)
446 return cret
447}
448
449// Lists the actions contained within @action_group.
450//
451// The caller is responsible for freeing the list with [func@GLib.strfreev] when
452// it is no longer required.
453func (x *ApplicationWindow) ListActions() []string {
454
455 cret := gio.XGActionGroupListActions(x.GoPointer())
456 return cret
457}
458
459// Queries all aspects of the named action within an @action_group.
460//
461// This function acquires the information available from
462// [method@Gio.ActionGroup.has_action], [method@Gio.ActionGroup.get_action_enabled],
463// [method@Gio.ActionGroup.get_action_parameter_type],
464// [method@Gio.ActionGroup.get_action_state_type],
465// [method@Gio.ActionGroup.get_action_state_hint] and
466// [method@Gio.ActionGroup.get_action_state] with a single function call.
467//
468// This provides two main benefits.
469//
470// The first is the improvement in efficiency that comes with not having
471// to perform repeated lookups of the action in order to discover
472// different things about it. The second is that implementing
473// [type@Gio.ActionGroup] can now be done by only overriding this one virtual
474// function.
475//
476// The interface provides a default implementation of this function that
477// calls the individual functions, as required, to fetch the
478// information. The interface also provides default implementations of
479// those functions that call this function. All implementations,
480// therefore, must override either this function or all of the others.
481//
482// If the action exists, `TRUE` is returned and any of the requested
483// fields (as indicated by having a non-`NULL` reference passed in) are
484// filled. If the action doesn’t exist, `FALSE` is returned and the
485// fields may or may not have been modified.
486func (x *ApplicationWindow) QueryAction(ActionNameVar string, EnabledVar *bool, ParameterTypeVar **glib.VariantType, StateTypeVar **glib.VariantType, StateHintVar **glib.Variant, StateVar **glib.Variant) bool {
487
488 cret := gio.XGActionGroupQueryAction(x.GoPointer(), ActionNameVar, EnabledVar, ParameterTypeVar, StateTypeVar, StateHintVar, StateVar)
489 return cret
490}
491
492// Adds an action to the @action_map.
493//
494// If the action map already contains an action with the same name
495// as @action then the old action is dropped from the action map.
496//
497// The action map takes its own reference on @action.
498func (x *ApplicationWindow) AddAction(ActionVar gio.Action) {
499
500 gio.XGActionMapAddAction(x.GoPointer(), ActionVar.GoPointer())
501
502}
503
504// A convenience function for creating multiple [class@Gio.SimpleAction]
505// instances and adding them to a [iface@Gio.ActionMap].
506//
507// Each action is constructed as per one [struct@Gio.ActionEntry].
508//
509// ```c
510// static void
511// activate_quit (GSimpleAction *simple,
512//
513// GVariant *parameter,
514// gpointer user_data)
515//
516// {
517// exit (0);
518// }
519//
520// static void
521// activate_print_string (GSimpleAction *simple,
522//
523// GVariant *parameter,
524// gpointer user_data)
525//
526// {
527// g_print ("%s\n", g_variant_get_string (parameter, NULL));
528// }
529//
530// static GActionGroup *
531// create_action_group (void)
532//
533// {
534// const GActionEntry entries[] = {
535// { "quit", activate_quit },
536// { "print-string", activate_print_string, "s" }
537// };
538// GSimpleActionGroup *group;
539//
540// group = g_simple_action_group_new ();
541// g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
542//
543// return G_ACTION_GROUP (group);
544// }
545//
546// ```
547func (x *ApplicationWindow) AddActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int, UserDataVar uintptr) {
548
549 gio.XGActionMapAddActionEntries(x.GoPointer(), EntriesVar, NEntriesVar, UserDataVar)
550
551}
552
553// Looks up the action with the name @action_name in @action_map.
554//
555// If no such action exists, returns `NULL`.
556func (x *ApplicationWindow) LookupAction(ActionNameVar string) *gio.ActionBase {
557 var cls *gio.ActionBase
558
559 cret := gio.XGActionMapLookupAction(x.GoPointer(), ActionNameVar)
560
561 if cret == 0 {
562 return nil
563 }
564 gobject.IncreaseRef(cret)
565 cls = &gio.ActionBase{}
566 cls.Ptr = cret
567 return cls
568}
569
570// Removes the named action from the action map.
571//
572// If no action of this name is in the map then nothing happens.
573func (x *ApplicationWindow) RemoveAction(ActionNameVar string) {
574
575 gio.XGActionMapRemoveAction(x.GoPointer(), ActionNameVar)
576
577}
578
579// Remove actions from a [iface@Gio.ActionMap]. This is meant as the reverse of
580// [method@Gio.ActionMap.add_action_entries].
581//
582// ```c
583//
584// static const GActionEntry entries[] = {
585// { "quit", activate_quit },
586// { "print-string", activate_print_string, "s" }
587// };
588//
589// void
590// add_actions (GActionMap *map)
591//
592// {
593// g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL);
594// }
595//
596// void
597// remove_actions (GActionMap *map)
598//
599// {
600// g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
601// }
602//
603// ```
604func (x *ApplicationWindow) RemoveActionEntries(EntriesVar []gio.ActionEntry, NEntriesVar int) {
605
606 gio.XGActionMapRemoveActionEntries(x.GoPointer(), EntriesVar, NEntriesVar)
607
608}
609
610// Requests the user's screen reader to announce the given message.
611//
612// This kind of notification is useful for messages that
613// either have only a visual representation or that are not
614// exposed visually at all, e.g. a notification about a
615// successful operation.
616//
617// Also, by using this API, you can ensure that the message
618// does not interrupts the user's current screen reader output.
619func (x *ApplicationWindow) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
620
621 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
622
623}
624
625// Retrieves the accessible parent for an accessible object.
626//
627// This function returns `NULL` for top level widgets.
628func (x *ApplicationWindow) GetAccessibleParent() *gtk.AccessibleBase {
629 var cls *gtk.AccessibleBase
630
631 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
632
633 if cret == 0 {
634 return nil
635 }
636 cls = >k.AccessibleBase{}
637 cls.Ptr = cret
638 return cls
639}
640
641// Retrieves the accessible role of an accessible object.
642func (x *ApplicationWindow) GetAccessibleRole() gtk.AccessibleRole {
643
644 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
645 return cret
646}
647
648// Retrieves the implementation for the given accessible object.
649func (x *ApplicationWindow) GetAtContext() *gtk.ATContext {
650 var cls *gtk.ATContext
651
652 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
653
654 if cret == 0 {
655 return nil
656 }
657 cls = >k.ATContext{}
658 cls.Ptr = cret
659 return cls
660}
661
662// Queries the coordinates and dimensions of this accessible
663//
664// This functionality can be overridden by `GtkAccessible`
665// implementations, e.g. to get the bounds from an ignored
666// child widget.
667func (x *ApplicationWindow) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
668
669 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
670 return cret
671}
672
673// Retrieves the first accessible child of an accessible object.
674func (x *ApplicationWindow) GetFirstAccessibleChild() *gtk.AccessibleBase {
675 var cls *gtk.AccessibleBase
676
677 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
678
679 if cret == 0 {
680 return nil
681 }
682 cls = >k.AccessibleBase{}
683 cls.Ptr = cret
684 return cls
685}
686
687// Retrieves the next accessible sibling of an accessible object
688func (x *ApplicationWindow) GetNextAccessibleSibling() *gtk.AccessibleBase {
689 var cls *gtk.AccessibleBase
690
691 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
692
693 if cret == 0 {
694 return nil
695 }
696 cls = >k.AccessibleBase{}
697 cls.Ptr = cret
698 return cls
699}
700
701// Queries a platform state, such as focus.
702//
703// This functionality can be overridden by `GtkAccessible`
704// implementations, e.g. to get platform state from an ignored
705// child widget, as is the case for `GtkText` wrappers.
706func (x *ApplicationWindow) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
707
708 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
709 return cret
710}
711
712// Resets the accessible property to its default value.
713func (x *ApplicationWindow) ResetProperty(PropertyVar gtk.AccessibleProperty) {
714
715 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
716
717}
718
719// Resets the accessible relation to its default value.
720func (x *ApplicationWindow) ResetRelation(RelationVar gtk.AccessibleRelation) {
721
722 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
723
724}
725
726// Resets the accessible state to its default value.
727func (x *ApplicationWindow) ResetState(StateVar gtk.AccessibleState) {
728
729 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
730
731}
732
733// Sets the parent and sibling of an accessible object.
734//
735// This function is meant to be used by accessible implementations that are
736// not part of the widget hierarchy, and but act as a logical bridge between
737// widgets. For instance, if a widget creates an object that holds metadata
738// for each child, and you want that object to implement the `GtkAccessible`
739// interface, you will use this function to ensure that the parent of each
740// child widget is the metadata object, and the parent of each metadata
741// object is the container widget.
742func (x *ApplicationWindow) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
743
744 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
745
746}
747
748// Updates the next accessible sibling.
749//
750// That might be useful when a new child of a custom accessible
751// is created, and it needs to be linked to a previous child.
752func (x *ApplicationWindow) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
753
754 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
755
756}
757
758// Informs ATs that the platform state has changed.
759//
760// This function should be used by `GtkAccessible` implementations that
761// have a platform state but are not widgets. Widgets handle platform
762// states automatically.
763func (x *ApplicationWindow) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
764
765 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
766
767}
768
769// Updates a list of accessible properties.
770//
771// See the [enum@Gtk.AccessibleProperty] documentation for the
772// value types of accessible properties.
773//
774// This function should be called by `GtkWidget` types whenever
775// an accessible property change must be communicated to assistive
776// technologies.
777//
778// Example:
779// ```c
780// value = gtk_adjustment_get_value (adjustment);
781// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
782//
783// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
784// -1);
785//
786// ```
787func (x *ApplicationWindow) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
788
789 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
790
791}
792
793// Updates an array of accessible properties.
794//
795// This function should be called by `GtkWidget` types whenever an accessible
796// property change must be communicated to assistive technologies.
797//
798// This function is meant to be used by language bindings.
799func (x *ApplicationWindow) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
800
801 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
802
803}
804
805// Updates a list of accessible relations.
806//
807// This function should be called by `GtkWidget` types whenever an accessible
808// relation change must be communicated to assistive technologies.
809//
810// If the [enum@Gtk.AccessibleRelation] requires a list of references,
811// you should pass each reference individually, followed by `NULL`, e.g.
812//
813// ```c
814// gtk_accessible_update_relation (accessible,
815//
816// GTK_ACCESSIBLE_RELATION_CONTROLS,
817// ref1, NULL,
818// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
819// ref1, ref2, ref3, NULL,
820// -1);
821//
822// ```
823func (x *ApplicationWindow) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
824
825 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
826
827}
828
829// Updates an array of accessible relations.
830//
831// This function should be called by `GtkWidget` types whenever an accessible
832// relation change must be communicated to assistive technologies.
833//
834// This function is meant to be used by language bindings.
835func (x *ApplicationWindow) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
836
837 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
838
839}
840
841// Updates a list of accessible states.
842//
843// See the [enum@Gtk.AccessibleState] documentation for the
844// value types of accessible states.
845//
846// This function should be called by `GtkWidget` types whenever
847// an accessible state change must be communicated to assistive
848// technologies.
849//
850// Example:
851//
852// ```c
853// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
854// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
855//
856// GTK_ACCESSIBLE_STATE_CHECKED, value,
857// -1);
858//
859// ```
860func (x *ApplicationWindow) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
861
862 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
863
864}
865
866// Updates an array of accessible states.
867//
868// This function should be called by `GtkWidget` types whenever an accessible
869// state change must be communicated to assistive technologies.
870//
871// This function is meant to be used by language bindings.
872func (x *ApplicationWindow) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
873
874 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
875
876}
877
878// Gets the ID of the @buildable object.
879//
880// `GtkBuilder` sets the name based on the ID attribute
881// of the `<object>` tag used to construct the @buildable.
882func (x *ApplicationWindow) GetBuildableId() string {
883
884 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
885 return cret
886}
887
888// Returns the renderer that is used for this `GtkNative`.
889func (x *ApplicationWindow) GetRenderer() *gsk.Renderer {
890 var cls *gsk.Renderer
891
892 cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
893
894 if cret == 0 {
895 return nil
896 }
897 gobject.IncreaseRef(cret)
898 cls = &gsk.Renderer{}
899 cls.Ptr = cret
900 return cls
901}
902
903// Returns the surface of this `GtkNative`.
904func (x *ApplicationWindow) GetSurface() *gdk.Surface {
905 var cls *gdk.Surface
906
907 cret := gtk.XGtkNativeGetSurface(x.GoPointer())
908
909 if cret == 0 {
910 return nil
911 }
912 gobject.IncreaseRef(cret)
913 cls = &gdk.Surface{}
914 cls.Ptr = cret
915 return cls
916}
917
918// Retrieves the surface transform of @self.
919//
920// This is the translation from @self's surface coordinates into
921// @self's widget coordinates.
922func (x *ApplicationWindow) GetSurfaceTransform(XVar *float64, YVar *float64) {
923
924 gtk.XGtkNativeGetSurfaceTransform(x.GoPointer(), XVar, YVar)
925
926}
927
928// Realizes a `GtkNative`.
929//
930// This should only be used by subclasses.
931func (x *ApplicationWindow) Realize() {
932
933 gtk.XGtkNativeRealize(x.GoPointer())
934
935}
936
937// Unrealizes a `GtkNative`.
938//
939// This should only be used by subclasses.
940func (x *ApplicationWindow) Unrealize() {
941
942 gtk.XGtkNativeUnrealize(x.GoPointer())
943
944}
945
946// Returns the display that this `GtkRoot` is on.
947func (x *ApplicationWindow) GetDisplay() *gdk.Display {
948 var cls *gdk.Display
949
950 cret := gtk.XGtkRootGetDisplay(x.GoPointer())
951
952 if cret == 0 {
953 return nil
954 }
955 gobject.IncreaseRef(cret)
956 cls = &gdk.Display{}
957 cls.Ptr = cret
958 return cls
959}
960
961// Retrieves the current focused widget within the root.
962//
963// Note that this is the widget that would have the focus
964// if the root is active; if the root is not focused then
965// `gtk_widget_has_focus (widget)` will be %FALSE for the
966// widget.
967func (x *ApplicationWindow) GetFocus() *gtk.Widget {
968 var cls *gtk.Widget
969
970 cret := gtk.XGtkRootGetFocus(x.GoPointer())
971
972 if cret == 0 {
973 return nil
974 }
975 gobject.IncreaseRef(cret)
976 cls = >k.Widget{}
977 cls.Ptr = cret
978 return cls
979}
980
981// If @focus is not the current focus widget, and is focusable, sets
982// it as the focus widget for the root.
983//
984// If @focus is %NULL, unsets the focus widget for the root.
985//
986// To set the focus to a particular widget in the root, it is usually
987// more convenient to use [method@Gtk.Widget.grab_focus] instead of
988// this function.
989func (x *ApplicationWindow) SetFocus(FocusVar *gtk.Widget) {
990
991 gtk.XGtkRootSetFocus(x.GoPointer(), FocusVar.GoPointer())
992
993}
994
995func init() {
996 core.SetPackageName("ADW", "libadwaita-1")
997 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
998 var libs []uintptr
999 for _, libPath := range core.GetPaths("ADW") {
1000 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1001 if err != nil {
1002 panic(err)
1003 }
1004 libs = append(libs, lib)
1005 }
1006
1007 core.PuregoSafeRegister(&xApplicationWindowGLibType, libs, "adw_application_window_get_type")
1008
1009 core.PuregoSafeRegister(&xNewApplicationWindow, libs, "adw_application_window_new")
1010
1011 core.PuregoSafeRegister(&xApplicationWindowAddBreakpoint, libs, "adw_application_window_add_breakpoint")
1012 core.PuregoSafeRegister(&xApplicationWindowGetAdaptivePreview, libs, "adw_application_window_get_adaptive_preview")
1013 core.PuregoSafeRegister(&xApplicationWindowGetContent, libs, "adw_application_window_get_content")
1014 core.PuregoSafeRegister(&xApplicationWindowGetCurrentBreakpoint, libs, "adw_application_window_get_current_breakpoint")
1015 core.PuregoSafeRegister(&xApplicationWindowGetDialogs, libs, "adw_application_window_get_dialogs")
1016 core.PuregoSafeRegister(&xApplicationWindowGetVisibleDialog, libs, "adw_application_window_get_visible_dialog")
1017 core.PuregoSafeRegister(&xApplicationWindowSetAdaptivePreview, libs, "adw_application_window_set_adaptive_preview")
1018 core.PuregoSafeRegister(&xApplicationWindowSetContent, libs, "adw_application_window_set_content")
1019
1020}