1// Package adw was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package adw
3
4import (
5 "fmt"
6 "structs"
7 "unsafe"
8
9 "github.com/ebitengine/purego"
10
11 "github.com/bnema/puregotk/pkg/core"
12 "github.com/bnema/puregotk/v4/gdk"
13 "github.com/bnema/puregotk/v4/gio"
14 "github.com/bnema/puregotk/v4/glib"
15 "github.com/bnema/puregotk/v4/gobject"
16 "github.com/bnema/puregotk/v4/gobject/types"
17 "github.com/bnema/puregotk/v4/gsk"
18 "github.com/bnema/puregotk/v4/gtk"
19)
20
21type MessageDialogClass struct {
22 _ structs.HostLayout
23
24 ParentClass gtk.WindowClass
25
26 xResponse uintptr
27
28 Padding [4]uintptr
29}
30
31func (x *MessageDialogClass) GoPointer() uintptr {
32 return uintptr(unsafe.Pointer(x))
33}
34
35// OverrideResponse sets the "response" callback function.
36func (x *MessageDialogClass) OverrideResponse(cb func(*MessageDialog, string)) {
37 if cb == nil {
38 x.xResponse = 0
39 } else {
40 x.xResponse = purego.NewCallback(func(SelfVarp uintptr, ResponseVarp string) {
41 cb(MessageDialogNewFromInternalPtr(SelfVarp), ResponseVarp)
42 })
43 }
44}
45
46// GetResponse gets the "response" callback function.
47func (x *MessageDialogClass) GetResponse() func(*MessageDialog, string) {
48 if x.xResponse == 0 {
49 return nil
50 }
51 var rawCallback func(SelfVarp uintptr, ResponseVarp string)
52 purego.RegisterFunc(&rawCallback, x.xResponse)
53 return func(SelfVar *MessageDialog, ResponseVar string) {
54 rawCallback(SelfVar.GoPointer(), ResponseVar)
55 }
56}
57
58// A dialog presenting a message or a question.
59//
60// <picture>
61//
62// <source srcset="message-dialog-dark.png" media="(prefers-color-scheme: dark)">
63// <img src="message-dialog.png" alt="message-dialog">
64//
65// </picture>
66//
67// Message dialogs have a heading, a body, an optional child widget, and one or
68// multiple responses, each presented as a button.
69//
70// Each response has a unique string ID, and a button label. Additionally, each
71// response can be enabled or disabled, and can have a suggested or destructive
72// appearance.
73//
74// When one of the responses is activated, or the dialog is closed, the
75// [signal@MessageDialog::response] signal will be emitted. This signal is
76// detailed, and the detail, as well as the `response` parameter will be set to
77// the ID of the activated response, or to the value of the
78// [property@MessageDialog:close-response] property if the dialog had been
79// closed without activating any of the responses.
80//
81// Response buttons can be presented horizontally or vertically depending on
82// available space.
83//
84// When a response is activated, `AdwMessageDialog` is closed automatically.
85//
86// An example of using a message dialog:
87//
88// ```c
89// GtkWidget *dialog;
90//
91// dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL);
92//
93// adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
94//
95// _("A file named “%s” already exists. Do you want to replace it?"),
96// filename);
97//
98// adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
99//
100// "cancel", _("_Cancel"),
101// "replace", _("_Replace"),
102// NULL);
103//
104// adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);
105//
106// adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
107// adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
108//
109// g_signal_connect (dialog, "response", G_CALLBACK (response_cb), self);
110//
111// gtk_window_present (GTK_WINDOW (dialog));
112// ```
113//
114// ## Async API
115//
116// `AdwMessageDialog` can also be used via the [method@MessageDialog.choose]
117// method. This API follows the GIO async pattern, for example:
118//
119// ```c
120// static void
121// dialog_cb (AdwMessageDialog *dialog,
122//
123// GAsyncResult *result,
124// MyWindow *self)
125//
126// {
127// const char *response = adw_message_dialog_choose_finish (dialog, result);
128//
129// // ...
130// }
131//
132// static void
133// show_dialog (MyWindow *self)
134//
135// {
136// GtkWidget *dialog;
137//
138// dialog = adw_message_dialog_new (GTK_WINDOW (self), _("Replace File?"), NULL);
139//
140// adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
141// _("A file named “%s” already exists. Do you want to replace it?"),
142// filename);
143//
144// adw_message_dialog_add_responses (ADW_MESSAGE_DIALOG (dialog),
145// "cancel", _("_Cancel"),
146// "replace", _("_Replace"),
147// NULL);
148//
149// adw_message_dialog_set_response_appearance (ADW_MESSAGE_DIALOG (dialog), "replace", ADW_RESPONSE_DESTRUCTIVE);
150//
151// adw_message_dialog_set_default_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
152// adw_message_dialog_set_close_response (ADW_MESSAGE_DIALOG (dialog), "cancel");
153//
154// adw_message_dialog_choose (ADW_MESSAGE_DIALOG (dialog), NULL, (GAsyncReadyCallback) dialog_cb, self);
155// }
156//
157// ```
158//
159// ## AdwMessageDialog as GtkBuildable
160//
161// `AdwMessageDialog` supports adding responses in UI definitions by via the
162// `<responses>` element that may contain multiple `<response>` elements, each
163// representing a response.
164//
165// Each of the `<response>` elements must have the `id` attribute specifying the
166// response ID. The contents of the element are used as the response label.
167//
168// Response labels can be translated with the usual `translatable`, `context`
169// and `comments` attributes.
170//
171// The `<response>` elements can also have `enabled` and/or `appearance`
172// attributes. See [method@MessageDialog.set_response_enabled] and
173// [method@MessageDialog.set_response_appearance] for details.
174//
175// Example of an `AdwMessageDialog` UI definition:
176//
177// ```xml
178// <object class="AdwMessageDialog" id="dialog">
179//
180// <property name="heading" translatable="yes">Save Changes?</property>
181// <property name="body" translatable="yes">Open documents contain unsaved changes. Changes which are not saved will be permanently lost.</property>
182// <property name="default-response">save</property>
183// <property name="close-response">cancel</property>
184// <signal name="response" handler="response_cb"/>
185// <responses>
186// <response id="cancel" translatable="yes">_Cancel</response>
187// <response id="discard" translatable="yes" appearance="destructive">_Discard</response>
188// <response id="save" translatable="yes" appearance="suggested" enabled="false">_Save</response>
189// </responses>
190//
191// </object>
192// ```
193//
194// ## Accessibility
195//
196// `AdwMessageDialog` uses the `GTK_ACCESSIBLE_ROLE_DIALOG` role.
197type MessageDialog struct {
198 gtk.Window
199}
200
201var xMessageDialogGLibType func() types.GType
202
203func MessageDialogGLibType() types.GType {
204 return xMessageDialogGLibType()
205}
206
207func MessageDialogNewFromInternalPtr(ptr uintptr) *MessageDialog {
208 cls := &MessageDialog{}
209 cls.Ptr = ptr
210 return cls
211}
212
213var xNewMessageDialog func(uintptr, uintptr, uintptr) uintptr
214
215// Creates a new `AdwMessageDialog`.
216//
217// @heading and @body can be set to `NULL`. This can be useful if they need to
218// be formatted or use markup. In that case, set them to `NULL` and call
219// [method@MessageDialog.format_body] or similar methods afterwards:
220//
221// ```c
222// GtkWidget *dialog;
223//
224// dialog = adw_message_dialog_new (parent, _("Replace File?"), NULL);
225// adw_message_dialog_format_body (ADW_MESSAGE_DIALOG (dialog),
226//
227// _("A file named “%s” already exists. Do you want to replace it?"),
228// filename);
229//
230// ```
231func NewMessageDialog(ParentVar *gtk.Window, HeadingVar *string, BodyVar *string) *MessageDialog {
232 var cls *MessageDialog
233
234 HeadingVarPtr := core.GStrdupNullable(HeadingVar)
235 defer core.GFreeNullable(HeadingVarPtr)
236
237 BodyVarPtr := core.GStrdupNullable(BodyVar)
238 defer core.GFreeNullable(BodyVarPtr)
239
240 cret := xNewMessageDialog(ParentVar.GoPointer(), HeadingVarPtr, BodyVarPtr)
241
242 if cret == 0 {
243 return nil
244 }
245 gobject.IncreaseRef(cret)
246 cls = &MessageDialog{}
247 cls.Ptr = cret
248 return cls
249}
250
251var xMessageDialogAddResponse func(uintptr, string, string)
252
253// Adds a response with @id and @label to @self.
254//
255// Responses are represented as buttons in the dialog.
256//
257// Response ID must be unique. It will be used in
258// [signal@MessageDialog::response] to tell which response had been activated,
259// as well as to inspect and modify the response later.
260//
261// An embedded underline in @label indicates a mnemonic.
262//
263// [method@MessageDialog.set_response_label] can be used to change the response
264// label after it had been added.
265//
266// [method@MessageDialog.set_response_enabled] and
267// [method@MessageDialog.set_response_appearance] can be used to customize the
268// responses further.
269func (x *MessageDialog) AddResponse(IdVar string, LabelVar string) {
270
271 xMessageDialogAddResponse(x.GoPointer(), IdVar, LabelVar)
272
273}
274
275var xMessageDialogAddResponses func(uintptr, string, ...interface{})
276
277// Adds multiple responses to @self.
278//
279// This is the same as calling [method@MessageDialog.add_response] repeatedly.
280// The variable argument list should be `NULL`-terminated list of response IDs
281// and labels.
282//
283// Example:
284//
285// ```c
286// adw_message_dialog_add_responses (dialog,
287//
288// "cancel", _("_Cancel"),
289// "discard", _("_Discard"),
290// "save", _("_Save"),
291// NULL);
292//
293// ```
294func (x *MessageDialog) AddResponses(FirstIdVar string, varArgs ...interface{}) {
295
296 xMessageDialogAddResponses(x.GoPointer(), FirstIdVar, varArgs...)
297
298}
299
300var xMessageDialogChoose func(uintptr, uintptr, uintptr, uintptr)
301
302// This function shows @self to the user.
303func (x *MessageDialog) Choose(CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr) {
304
305 var CallbackVarRef uintptr
306 if CallbackVar != nil {
307 CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
308 if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
309 CallbackVarRef = cbRefPtr
310 } else {
311 fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
312 cbFn := *CallbackVar
313 cbFn(arg0, arg1, arg2)
314 }
315 CallbackVarRef = purego.NewCallback(fcb)
316 glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
317 }
318 }
319
320 xMessageDialogChoose(x.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
321
322}
323
324var xMessageDialogChooseFinish func(uintptr, uintptr) string
325
326// Finishes the [method@MessageDialog.choose] call and returns the response ID.
327func (x *MessageDialog) ChooseFinish(ResultVar gio.AsyncResult) string {
328
329 cret := xMessageDialogChooseFinish(x.GoPointer(), ResultVar.GoPointer())
330 return cret
331}
332
333var xMessageDialogFormatBody func(uintptr, string, ...interface{})
334
335// Sets the formatted body text of @self.
336//
337// See [property@MessageDialog:body].
338func (x *MessageDialog) FormatBody(FormatVar string, varArgs ...interface{}) {
339
340 xMessageDialogFormatBody(x.GoPointer(), FormatVar, varArgs...)
341
342}
343
344var xMessageDialogFormatBodyMarkup func(uintptr, string, ...interface{})
345
346// Sets the formatted body text of @self with Pango markup.
347//
348// The @format is assumed to contain Pango markup.
349//
350// Special XML characters in the `printf()` arguments passed to this function
351// will automatically be escaped as necessary, see
352// [func@GLib.markup_printf_escaped].
353//
354// See [property@MessageDialog:body].
355func (x *MessageDialog) FormatBodyMarkup(FormatVar string, varArgs ...interface{}) {
356
357 xMessageDialogFormatBodyMarkup(x.GoPointer(), FormatVar, varArgs...)
358
359}
360
361var xMessageDialogFormatHeading func(uintptr, string, ...interface{})
362
363// Sets the formatted heading of @self.
364//
365// See [property@MessageDialog:heading].
366func (x *MessageDialog) FormatHeading(FormatVar string, varArgs ...interface{}) {
367
368 xMessageDialogFormatHeading(x.GoPointer(), FormatVar, varArgs...)
369
370}
371
372var xMessageDialogFormatHeadingMarkup func(uintptr, string, ...interface{})
373
374// Sets the formatted heading of @self with Pango markup.
375//
376// The @format is assumed to contain Pango markup.
377//
378// Special XML characters in the `printf()` arguments passed to this function
379// will automatically be escaped as necessary, see
380// [func@GLib.markup_printf_escaped].
381//
382// See [property@MessageDialog:heading].
383func (x *MessageDialog) FormatHeadingMarkup(FormatVar string, varArgs ...interface{}) {
384
385 xMessageDialogFormatHeadingMarkup(x.GoPointer(), FormatVar, varArgs...)
386
387}
388
389var xMessageDialogGetBody func(uintptr) string
390
391// Gets the body text of @self.
392func (x *MessageDialog) GetBody() string {
393
394 cret := xMessageDialogGetBody(x.GoPointer())
395 return cret
396}
397
398var xMessageDialogGetBodyUseMarkup func(uintptr) bool
399
400// Gets whether the body text of @self includes Pango markup.
401func (x *MessageDialog) GetBodyUseMarkup() bool {
402
403 cret := xMessageDialogGetBodyUseMarkup(x.GoPointer())
404 return cret
405}
406
407var xMessageDialogGetCloseResponse func(uintptr) string
408
409// Gets the ID of the close response of @self.
410func (x *MessageDialog) GetCloseResponse() string {
411
412 cret := xMessageDialogGetCloseResponse(x.GoPointer())
413 return cret
414}
415
416var xMessageDialogGetDefaultResponse func(uintptr) string
417
418// Gets the ID of the default response of @self.
419func (x *MessageDialog) GetDefaultResponse() string {
420
421 cret := xMessageDialogGetDefaultResponse(x.GoPointer())
422 return cret
423}
424
425var xMessageDialogGetExtraChild func(uintptr) uintptr
426
427// Gets the child widget of @self.
428func (x *MessageDialog) GetExtraChild() *gtk.Widget {
429 var cls *gtk.Widget
430
431 cret := xMessageDialogGetExtraChild(x.GoPointer())
432
433 if cret == 0 {
434 return nil
435 }
436 gobject.IncreaseRef(cret)
437 cls = >k.Widget{}
438 cls.Ptr = cret
439 return cls
440}
441
442var xMessageDialogGetHeading func(uintptr) string
443
444// Gets the heading of @self.
445func (x *MessageDialog) GetHeading() string {
446
447 cret := xMessageDialogGetHeading(x.GoPointer())
448 return cret
449}
450
451var xMessageDialogGetHeadingUseMarkup func(uintptr) bool
452
453// Gets whether the heading of @self includes Pango markup.
454func (x *MessageDialog) GetHeadingUseMarkup() bool {
455
456 cret := xMessageDialogGetHeadingUseMarkup(x.GoPointer())
457 return cret
458}
459
460var xMessageDialogGetResponseAppearance func(uintptr, string) ResponseAppearance
461
462// Gets the appearance of @response.
463//
464// See [method@MessageDialog.set_response_appearance].
465func (x *MessageDialog) GetResponseAppearance(ResponseVar string) ResponseAppearance {
466
467 cret := xMessageDialogGetResponseAppearance(x.GoPointer(), ResponseVar)
468 return cret
469}
470
471var xMessageDialogGetResponseEnabled func(uintptr, string) bool
472
473// Gets whether @response is enabled.
474//
475// See [method@MessageDialog.set_response_enabled].
476func (x *MessageDialog) GetResponseEnabled(ResponseVar string) bool {
477
478 cret := xMessageDialogGetResponseEnabled(x.GoPointer(), ResponseVar)
479 return cret
480}
481
482var xMessageDialogGetResponseLabel func(uintptr, string) string
483
484// Gets the label of @response.
485//
486// See [method@MessageDialog.set_response_label].
487func (x *MessageDialog) GetResponseLabel(ResponseVar string) string {
488
489 cret := xMessageDialogGetResponseLabel(x.GoPointer(), ResponseVar)
490 return cret
491}
492
493var xMessageDialogHasResponse func(uintptr, string) bool
494
495// Gets whether @self has a response with the ID @response.
496func (x *MessageDialog) HasResponse(ResponseVar string) bool {
497
498 cret := xMessageDialogHasResponse(x.GoPointer(), ResponseVar)
499 return cret
500}
501
502var xMessageDialogRemoveResponse func(uintptr, string)
503
504// Removes a response from @self.
505func (x *MessageDialog) RemoveResponse(IdVar string) {
506
507 xMessageDialogRemoveResponse(x.GoPointer(), IdVar)
508
509}
510
511var xMessageDialogResponse func(uintptr, string)
512
513// Emits the [signal@MessageDialog::response] signal with the given response ID.
514//
515// Used to indicate that the user has responded to the dialog in some way.
516func (x *MessageDialog) Response(ResponseVar string) {
517
518 xMessageDialogResponse(x.GoPointer(), ResponseVar)
519
520}
521
522var xMessageDialogSetBody func(uintptr, string)
523
524// Sets the body text of @self.
525func (x *MessageDialog) SetBody(BodyVar string) {
526
527 xMessageDialogSetBody(x.GoPointer(), BodyVar)
528
529}
530
531var xMessageDialogSetBodyUseMarkup func(uintptr, bool)
532
533// Sets whether the body text of @self includes Pango markup.
534//
535// See [func@Pango.parse_markup].
536func (x *MessageDialog) SetBodyUseMarkup(UseMarkupVar bool) {
537
538 xMessageDialogSetBodyUseMarkup(x.GoPointer(), UseMarkupVar)
539
540}
541
542var xMessageDialogSetCloseResponse func(uintptr, string)
543
544// Sets the ID of the close response of @self.
545//
546// It will be passed to [signal@MessageDialog::response] if the window is
547// closed by pressing <kbd>Escape</kbd> or with a system action.
548//
549// It doesn't have to correspond to any of the responses in the dialog.
550//
551// The default close response is `close`.
552func (x *MessageDialog) SetCloseResponse(ResponseVar string) {
553
554 xMessageDialogSetCloseResponse(x.GoPointer(), ResponseVar)
555
556}
557
558var xMessageDialogSetDefaultResponse func(uintptr, uintptr)
559
560// Sets the ID of the default response of @self.
561//
562// The button corresponding to this response will be set as the default widget
563// of @self.
564//
565// If not set, the default widget will not be set, and the last added response
566// will be focused by default.
567//
568// See [property@Gtk.Window:default-widget].
569func (x *MessageDialog) SetDefaultResponse(ResponseVar *string) {
570
571 ResponseVarPtr := core.GStrdupNullable(ResponseVar)
572 defer core.GFreeNullable(ResponseVarPtr)
573
574 xMessageDialogSetDefaultResponse(x.GoPointer(), ResponseVarPtr)
575
576}
577
578var xMessageDialogSetExtraChild func(uintptr, uintptr)
579
580// Sets the child widget of @self.
581//
582// The child widget is displayed below the heading and body.
583func (x *MessageDialog) SetExtraChild(ChildVar *gtk.Widget) {
584
585 xMessageDialogSetExtraChild(x.GoPointer(), ChildVar.GoPointer())
586
587}
588
589var xMessageDialogSetHeading func(uintptr, uintptr)
590
591// Sets the heading of @self.
592func (x *MessageDialog) SetHeading(HeadingVar *string) {
593
594 HeadingVarPtr := core.GStrdupNullable(HeadingVar)
595 defer core.GFreeNullable(HeadingVarPtr)
596
597 xMessageDialogSetHeading(x.GoPointer(), HeadingVarPtr)
598
599}
600
601var xMessageDialogSetHeadingUseMarkup func(uintptr, bool)
602
603// Sets whether the heading of @self includes Pango markup.
604//
605// See [func@Pango.parse_markup].
606func (x *MessageDialog) SetHeadingUseMarkup(UseMarkupVar bool) {
607
608 xMessageDialogSetHeadingUseMarkup(x.GoPointer(), UseMarkupVar)
609
610}
611
612var xMessageDialogSetResponseAppearance func(uintptr, string, ResponseAppearance)
613
614// Sets the appearance for @response.
615//
616// <picture>
617//
618// <source srcset="message-dialog-appearance-dark.png" media="(prefers-color-scheme: dark)">
619// <img src="message-dialog-appearance.png" alt="message-dialog-appearance">
620//
621// </picture>
622//
623// Use `ADW_RESPONSE_SUGGESTED` to mark important responses such as the
624// affirmative action, like the Save button in the example.
625//
626// Use `ADW_RESPONSE_DESTRUCTIVE` to draw attention to the potentially damaging
627// consequences of using @response. This appearance acts as a warning to the
628// user. The Discard button in the example is using this appearance.
629//
630// The default appearance is `ADW_RESPONSE_DEFAULT`.
631//
632// Negative responses like Cancel or Close should use the default appearance.
633func (x *MessageDialog) SetResponseAppearance(ResponseVar string, AppearanceVar ResponseAppearance) {
634
635 xMessageDialogSetResponseAppearance(x.GoPointer(), ResponseVar, AppearanceVar)
636
637}
638
639var xMessageDialogSetResponseEnabled func(uintptr, string, bool)
640
641// Sets whether @response is enabled.
642//
643// If @response is not enabled, the corresponding button will have
644// [property@Gtk.Widget:sensitive] set to `FALSE` and it can't be activated as
645// a default response.
646//
647// @response can still be used as [property@MessageDialog:close-response] while
648// it's not enabled.
649//
650// Responses are enabled by default.
651func (x *MessageDialog) SetResponseEnabled(ResponseVar string, EnabledVar bool) {
652
653 xMessageDialogSetResponseEnabled(x.GoPointer(), ResponseVar, EnabledVar)
654
655}
656
657var xMessageDialogSetResponseLabel func(uintptr, string, string)
658
659// Sets the label of @response to @label.
660//
661// Labels are displayed on the dialog buttons. An embedded underline in @label
662// indicates a mnemonic.
663func (x *MessageDialog) SetResponseLabel(ResponseVar string, LabelVar string) {
664
665 xMessageDialogSetResponseLabel(x.GoPointer(), ResponseVar, LabelVar)
666
667}
668
669func (c *MessageDialog) GoPointer() uintptr {
670 if c == nil {
671 return 0
672 }
673 return c.Ptr
674}
675
676func (c *MessageDialog) SetGoPointer(ptr uintptr) {
677 c.Ptr = ptr
678}
679
680// SetPropertyBody sets the "body" property.
681// The body text of the dialog.
682func (x *MessageDialog) SetPropertyBody(value string) {
683 var v gobject.Value
684 v.Init(gobject.TypeStringVal)
685 v.SetString(&value)
686 x.SetProperty("body", &v)
687}
688
689// GetPropertyBody gets the "body" property.
690// The body text of the dialog.
691func (x *MessageDialog) GetPropertyBody() string {
692 var v gobject.Value
693 x.GetProperty("body", &v)
694 return v.GetString()
695}
696
697// SetPropertyBodyUseMarkup sets the "body-use-markup" property.
698// Whether the body text includes Pango markup.
699//
700// See [func@Pango.parse_markup].
701func (x *MessageDialog) SetPropertyBodyUseMarkup(value bool) {
702 var v gobject.Value
703 v.Init(gobject.TypeBooleanVal)
704 v.SetBoolean(value)
705 x.SetProperty("body-use-markup", &v)
706}
707
708// GetPropertyBodyUseMarkup gets the "body-use-markup" property.
709// Whether the body text includes Pango markup.
710//
711// See [func@Pango.parse_markup].
712func (x *MessageDialog) GetPropertyBodyUseMarkup() bool {
713 var v gobject.Value
714 x.GetProperty("body-use-markup", &v)
715 return v.GetBoolean()
716}
717
718// SetPropertyCloseResponse sets the "close-response" property.
719// The ID of the close response.
720//
721// It will be passed to [signal@MessageDialog::response] if the window is
722// closed by pressing <kbd>Escape</kbd> or with a system action.
723//
724// It doesn't have to correspond to any of the responses in the dialog.
725//
726// The default close response is `close`.
727func (x *MessageDialog) SetPropertyCloseResponse(value string) {
728 var v gobject.Value
729 v.Init(gobject.TypeStringVal)
730 v.SetString(&value)
731 x.SetProperty("close-response", &v)
732}
733
734// GetPropertyCloseResponse gets the "close-response" property.
735// The ID of the close response.
736//
737// It will be passed to [signal@MessageDialog::response] if the window is
738// closed by pressing <kbd>Escape</kbd> or with a system action.
739//
740// It doesn't have to correspond to any of the responses in the dialog.
741//
742// The default close response is `close`.
743func (x *MessageDialog) GetPropertyCloseResponse() string {
744 var v gobject.Value
745 x.GetProperty("close-response", &v)
746 return v.GetString()
747}
748
749// SetPropertyDefaultResponse sets the "default-response" property.
750// The response ID of the default response.
751//
752// The button corresponding to this response will be set as the default widget
753// of the dialog.
754//
755// If not set, the default widget will not be set, and the last added response
756// will be focused by default.
757//
758// See [property@Gtk.Window:default-widget].
759func (x *MessageDialog) SetPropertyDefaultResponse(value string) {
760 var v gobject.Value
761 v.Init(gobject.TypeStringVal)
762 v.SetString(&value)
763 x.SetProperty("default-response", &v)
764}
765
766// GetPropertyDefaultResponse gets the "default-response" property.
767// The response ID of the default response.
768//
769// The button corresponding to this response will be set as the default widget
770// of the dialog.
771//
772// If not set, the default widget will not be set, and the last added response
773// will be focused by default.
774//
775// See [property@Gtk.Window:default-widget].
776func (x *MessageDialog) GetPropertyDefaultResponse() string {
777 var v gobject.Value
778 x.GetProperty("default-response", &v)
779 return v.GetString()
780}
781
782// SetPropertyHeading sets the "heading" property.
783// The heading of the dialog.
784func (x *MessageDialog) SetPropertyHeading(value string) {
785 var v gobject.Value
786 v.Init(gobject.TypeStringVal)
787 v.SetString(&value)
788 x.SetProperty("heading", &v)
789}
790
791// GetPropertyHeading gets the "heading" property.
792// The heading of the dialog.
793func (x *MessageDialog) GetPropertyHeading() string {
794 var v gobject.Value
795 x.GetProperty("heading", &v)
796 return v.GetString()
797}
798
799// SetPropertyHeadingUseMarkup sets the "heading-use-markup" property.
800// Whether the heading includes Pango markup.
801//
802// See [func@Pango.parse_markup].
803func (x *MessageDialog) SetPropertyHeadingUseMarkup(value bool) {
804 var v gobject.Value
805 v.Init(gobject.TypeBooleanVal)
806 v.SetBoolean(value)
807 x.SetProperty("heading-use-markup", &v)
808}
809
810// GetPropertyHeadingUseMarkup gets the "heading-use-markup" property.
811// Whether the heading includes Pango markup.
812//
813// See [func@Pango.parse_markup].
814func (x *MessageDialog) GetPropertyHeadingUseMarkup() bool {
815 var v gobject.Value
816 x.GetProperty("heading-use-markup", &v)
817 return v.GetBoolean()
818}
819
820// This signal is emitted when the dialog is closed.
821//
822// @response will be set to the response ID of the button that had been
823// activated.
824//
825// if the dialog was closed by pressing <kbd>Escape</kbd> or with a system
826// action, @response will be set to the value of
827// [property@MessageDialog:close-response].
828func (x *MessageDialog) ConnectResponse(cb *func(MessageDialog, string)) uint {
829 cbPtr := uintptr(unsafe.Pointer(cb))
830 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
831 handlerID := gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
832 glib.SaveHandlerMapping(handlerID, cbPtr)
833 return handlerID
834 }
835
836 fcb := func(clsPtr uintptr, ResponseVarp uintptr) {
837 fa := MessageDialog{}
838 fa.Ptr = clsPtr
839 cbFn := *cb
840
841 cbFn(fa, core.GoString(ResponseVarp))
842
843 }
844 cbRefPtr := purego.NewCallback(fcb)
845 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
846 handlerID := gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
847 glib.SaveHandlerMapping(handlerID, cbPtr)
848 return handlerID
849}
850
851// ConnectResponseWithDetail connects to the "response" signal with a detail string.
852// The detail is appended as "response::<detail>".
853func (x *MessageDialog) ConnectResponseWithDetail(detail string, cb *func(MessageDialog, string)) uint {
854 cbPtr := uintptr(unsafe.Pointer(cb))
855 signalName := fmt.Sprintf("response::%s", detail)
856 if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
857 handlerID := gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
858 glib.SaveHandlerMapping(handlerID, cbPtr)
859 return handlerID
860 }
861
862 fcb := func(clsPtr uintptr, ResponseVarp uintptr) {
863 fa := MessageDialog{}
864 fa.Ptr = clsPtr
865 cbFn := *cb
866
867 cbFn(fa, core.GoString(ResponseVarp))
868
869 }
870 cbRefPtr := purego.NewCallback(fcb)
871 glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
872 handlerID := gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
873 glib.SaveHandlerMapping(handlerID, cbPtr)
874 return handlerID
875}
876
877// Requests the user's screen reader to announce the given message.
878//
879// This kind of notification is useful for messages that
880// either have only a visual representation or that are not
881// exposed visually at all, e.g. a notification about a
882// successful operation.
883//
884// Also, by using this API, you can ensure that the message
885// does not interrupts the user's current screen reader output.
886func (x *MessageDialog) Announce(MessageVar string, PriorityVar gtk.AccessibleAnnouncementPriority) {
887
888 gtk.XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
889
890}
891
892// Retrieves the accessible parent for an accessible object.
893//
894// This function returns `NULL` for top level widgets.
895func (x *MessageDialog) GetAccessibleParent() *gtk.AccessibleBase {
896 var cls *gtk.AccessibleBase
897
898 cret := gtk.XGtkAccessibleGetAccessibleParent(x.GoPointer())
899
900 if cret == 0 {
901 return nil
902 }
903 cls = >k.AccessibleBase{}
904 cls.Ptr = cret
905 return cls
906}
907
908// Retrieves the accessible role of an accessible object.
909func (x *MessageDialog) GetAccessibleRole() gtk.AccessibleRole {
910
911 cret := gtk.XGtkAccessibleGetAccessibleRole(x.GoPointer())
912 return cret
913}
914
915// Retrieves the implementation for the given accessible object.
916func (x *MessageDialog) GetAtContext() *gtk.ATContext {
917 var cls *gtk.ATContext
918
919 cret := gtk.XGtkAccessibleGetAtContext(x.GoPointer())
920
921 if cret == 0 {
922 return nil
923 }
924 cls = >k.ATContext{}
925 cls.Ptr = cret
926 return cls
927}
928
929// Queries the coordinates and dimensions of this accessible
930//
931// This functionality can be overridden by `GtkAccessible`
932// implementations, e.g. to get the bounds from an ignored
933// child widget.
934func (x *MessageDialog) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
935
936 cret := gtk.XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
937 return cret
938}
939
940// Retrieves the first accessible child of an accessible object.
941func (x *MessageDialog) GetFirstAccessibleChild() *gtk.AccessibleBase {
942 var cls *gtk.AccessibleBase
943
944 cret := gtk.XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
945
946 if cret == 0 {
947 return nil
948 }
949 cls = >k.AccessibleBase{}
950 cls.Ptr = cret
951 return cls
952}
953
954// Retrieves the next accessible sibling of an accessible object
955func (x *MessageDialog) GetNextAccessibleSibling() *gtk.AccessibleBase {
956 var cls *gtk.AccessibleBase
957
958 cret := gtk.XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
959
960 if cret == 0 {
961 return nil
962 }
963 cls = >k.AccessibleBase{}
964 cls.Ptr = cret
965 return cls
966}
967
968// Queries a platform state, such as focus.
969//
970// This functionality can be overridden by `GtkAccessible`
971// implementations, e.g. to get platform state from an ignored
972// child widget, as is the case for `GtkText` wrappers.
973func (x *MessageDialog) GetPlatformState(StateVar gtk.AccessiblePlatformState) bool {
974
975 cret := gtk.XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
976 return cret
977}
978
979// Resets the accessible property to its default value.
980func (x *MessageDialog) ResetProperty(PropertyVar gtk.AccessibleProperty) {
981
982 gtk.XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
983
984}
985
986// Resets the accessible relation to its default value.
987func (x *MessageDialog) ResetRelation(RelationVar gtk.AccessibleRelation) {
988
989 gtk.XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
990
991}
992
993// Resets the accessible state to its default value.
994func (x *MessageDialog) ResetState(StateVar gtk.AccessibleState) {
995
996 gtk.XGtkAccessibleResetState(x.GoPointer(), StateVar)
997
998}
999
1000// Sets the parent and sibling of an accessible object.
1001//
1002// This function is meant to be used by accessible implementations that are
1003// not part of the widget hierarchy, and but act as a logical bridge between
1004// widgets. For instance, if a widget creates an object that holds metadata
1005// for each child, and you want that object to implement the `GtkAccessible`
1006// interface, you will use this function to ensure that the parent of each
1007// child widget is the metadata object, and the parent of each metadata
1008// object is the container widget.
1009func (x *MessageDialog) SetAccessibleParent(ParentVar gtk.Accessible, NextSiblingVar gtk.Accessible) {
1010
1011 gtk.XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
1012
1013}
1014
1015// Updates the next accessible sibling.
1016//
1017// That might be useful when a new child of a custom accessible
1018// is created, and it needs to be linked to a previous child.
1019func (x *MessageDialog) UpdateNextAccessibleSibling(NewSiblingVar gtk.Accessible) {
1020
1021 gtk.XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
1022
1023}
1024
1025// Informs ATs that the platform state has changed.
1026//
1027// This function should be used by `GtkAccessible` implementations that
1028// have a platform state but are not widgets. Widgets handle platform
1029// states automatically.
1030func (x *MessageDialog) UpdatePlatformState(StateVar gtk.AccessiblePlatformState) {
1031
1032 gtk.XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
1033
1034}
1035
1036// Updates a list of accessible properties.
1037//
1038// See the [enum@Gtk.AccessibleProperty] documentation for the
1039// value types of accessible properties.
1040//
1041// This function should be called by `GtkWidget` types whenever
1042// an accessible property change must be communicated to assistive
1043// technologies.
1044//
1045// Example:
1046// ```c
1047// value = gtk_adjustment_get_value (adjustment);
1048// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
1049//
1050// GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
1051// -1);
1052//
1053// ```
1054func (x *MessageDialog) UpdateProperty(FirstPropertyVar gtk.AccessibleProperty, varArgs ...interface{}) {
1055
1056 gtk.XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
1057
1058}
1059
1060// Updates an array of accessible properties.
1061//
1062// This function should be called by `GtkWidget` types whenever an accessible
1063// property change must be communicated to assistive technologies.
1064//
1065// This function is meant to be used by language bindings.
1066func (x *MessageDialog) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []gtk.AccessibleProperty, ValuesVar []gobject.Value) {
1067
1068 gtk.XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
1069
1070}
1071
1072// Updates a list of accessible relations.
1073//
1074// This function should be called by `GtkWidget` types whenever an accessible
1075// relation change must be communicated to assistive technologies.
1076//
1077// If the [enum@Gtk.AccessibleRelation] requires a list of references,
1078// you should pass each reference individually, followed by `NULL`, e.g.
1079//
1080// ```c
1081// gtk_accessible_update_relation (accessible,
1082//
1083// GTK_ACCESSIBLE_RELATION_CONTROLS,
1084// ref1, NULL,
1085// GTK_ACCESSIBLE_RELATION_LABELLED_BY,
1086// ref1, ref2, ref3, NULL,
1087// -1);
1088//
1089// ```
1090func (x *MessageDialog) UpdateRelation(FirstRelationVar gtk.AccessibleRelation, varArgs ...interface{}) {
1091
1092 gtk.XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
1093
1094}
1095
1096// Updates an array of accessible relations.
1097//
1098// This function should be called by `GtkWidget` types whenever an accessible
1099// relation change must be communicated to assistive technologies.
1100//
1101// This function is meant to be used by language bindings.
1102func (x *MessageDialog) UpdateRelationValue(NRelationsVar int, RelationsVar []gtk.AccessibleRelation, ValuesVar []gobject.Value) {
1103
1104 gtk.XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
1105
1106}
1107
1108// Updates a list of accessible states.
1109//
1110// See the [enum@Gtk.AccessibleState] documentation for the
1111// value types of accessible states.
1112//
1113// This function should be called by `GtkWidget` types whenever
1114// an accessible state change must be communicated to assistive
1115// technologies.
1116//
1117// Example:
1118//
1119// ```c
1120// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
1121// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
1122//
1123// GTK_ACCESSIBLE_STATE_CHECKED, value,
1124// -1);
1125//
1126// ```
1127func (x *MessageDialog) UpdateState(FirstStateVar gtk.AccessibleState, varArgs ...interface{}) {
1128
1129 gtk.XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
1130
1131}
1132
1133// Updates an array of accessible states.
1134//
1135// This function should be called by `GtkWidget` types whenever an accessible
1136// state change must be communicated to assistive technologies.
1137//
1138// This function is meant to be used by language bindings.
1139func (x *MessageDialog) UpdateStateValue(NStatesVar int, StatesVar []gtk.AccessibleState, ValuesVar []gobject.Value) {
1140
1141 gtk.XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
1142
1143}
1144
1145// Gets the ID of the @buildable object.
1146//
1147// `GtkBuilder` sets the name based on the ID attribute
1148// of the `<object>` tag used to construct the @buildable.
1149func (x *MessageDialog) GetBuildableId() string {
1150
1151 cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
1152 return cret
1153}
1154
1155// Returns the renderer that is used for this `GtkNative`.
1156func (x *MessageDialog) GetRenderer() *gsk.Renderer {
1157 var cls *gsk.Renderer
1158
1159 cret := gtk.XGtkNativeGetRenderer(x.GoPointer())
1160
1161 if cret == 0 {
1162 return nil
1163 }
1164 gobject.IncreaseRef(cret)
1165 cls = &gsk.Renderer{}
1166 cls.Ptr = cret
1167 return cls
1168}
1169
1170// Returns the surface of this `GtkNative`.
1171func (x *MessageDialog) GetSurface() *gdk.Surface {
1172 var cls *gdk.Surface
1173
1174 cret := gtk.XGtkNativeGetSurface(x.GoPointer())
1175
1176 if cret == 0 {
1177 return nil
1178 }
1179 gobject.IncreaseRef(cret)
1180 cls = &gdk.Surface{}
1181 cls.Ptr = cret
1182 return cls
1183}
1184
1185// Retrieves the surface transform of @self.
1186//
1187// This is the translation from @self's surface coordinates into
1188// @self's widget coordinates.
1189func (x *MessageDialog) GetSurfaceTransform(XVar *float64, YVar *float64) {
1190
1191 gtk.XGtkNativeGetSurfaceTransform(x.GoPointer(), XVar, YVar)
1192
1193}
1194
1195// Realizes a `GtkNative`.
1196//
1197// This should only be used by subclasses.
1198func (x *MessageDialog) Realize() {
1199
1200 gtk.XGtkNativeRealize(x.GoPointer())
1201
1202}
1203
1204// Unrealizes a `GtkNative`.
1205//
1206// This should only be used by subclasses.
1207func (x *MessageDialog) Unrealize() {
1208
1209 gtk.XGtkNativeUnrealize(x.GoPointer())
1210
1211}
1212
1213// Returns the display that this `GtkRoot` is on.
1214func (x *MessageDialog) GetDisplay() *gdk.Display {
1215 var cls *gdk.Display
1216
1217 cret := gtk.XGtkRootGetDisplay(x.GoPointer())
1218
1219 if cret == 0 {
1220 return nil
1221 }
1222 gobject.IncreaseRef(cret)
1223 cls = &gdk.Display{}
1224 cls.Ptr = cret
1225 return cls
1226}
1227
1228// Retrieves the current focused widget within the root.
1229//
1230// Note that this is the widget that would have the focus
1231// if the root is active; if the root is not focused then
1232// `gtk_widget_has_focus (widget)` will be %FALSE for the
1233// widget.
1234func (x *MessageDialog) GetFocus() *gtk.Widget {
1235 var cls *gtk.Widget
1236
1237 cret := gtk.XGtkRootGetFocus(x.GoPointer())
1238
1239 if cret == 0 {
1240 return nil
1241 }
1242 gobject.IncreaseRef(cret)
1243 cls = >k.Widget{}
1244 cls.Ptr = cret
1245 return cls
1246}
1247
1248// If @focus is not the current focus widget, and is focusable, sets
1249// it as the focus widget for the root.
1250//
1251// If @focus is %NULL, unsets the focus widget for the root.
1252//
1253// To set the focus to a particular widget in the root, it is usually
1254// more convenient to use [method@Gtk.Widget.grab_focus] instead of
1255// this function.
1256func (x *MessageDialog) SetFocus(FocusVar *gtk.Widget) {
1257
1258 gtk.XGtkRootSetFocus(x.GoPointer(), FocusVar.GoPointer())
1259
1260}
1261
1262func init() {
1263 core.SetPackageName("ADW", "libadwaita-1")
1264 core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
1265 var libs []uintptr
1266 for _, libPath := range core.GetPaths("ADW") {
1267 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1268 if err != nil {
1269 panic(err)
1270 }
1271 libs = append(libs, lib)
1272 }
1273
1274 core.PuregoSafeRegister(&xMessageDialogGLibType, libs, "adw_message_dialog_get_type")
1275
1276 core.PuregoSafeRegister(&xNewMessageDialog, libs, "adw_message_dialog_new")
1277
1278 core.PuregoSafeRegister(&xMessageDialogAddResponse, libs, "adw_message_dialog_add_response")
1279 core.PuregoSafeRegister(&xMessageDialogAddResponses, libs, "adw_message_dialog_add_responses")
1280 core.PuregoSafeRegister(&xMessageDialogChoose, libs, "adw_message_dialog_choose")
1281 core.PuregoSafeRegister(&xMessageDialogChooseFinish, libs, "adw_message_dialog_choose_finish")
1282 core.PuregoSafeRegister(&xMessageDialogFormatBody, libs, "adw_message_dialog_format_body")
1283 core.PuregoSafeRegister(&xMessageDialogFormatBodyMarkup, libs, "adw_message_dialog_format_body_markup")
1284 core.PuregoSafeRegister(&xMessageDialogFormatHeading, libs, "adw_message_dialog_format_heading")
1285 core.PuregoSafeRegister(&xMessageDialogFormatHeadingMarkup, libs, "adw_message_dialog_format_heading_markup")
1286 core.PuregoSafeRegister(&xMessageDialogGetBody, libs, "adw_message_dialog_get_body")
1287 core.PuregoSafeRegister(&xMessageDialogGetBodyUseMarkup, libs, "adw_message_dialog_get_body_use_markup")
1288 core.PuregoSafeRegister(&xMessageDialogGetCloseResponse, libs, "adw_message_dialog_get_close_response")
1289 core.PuregoSafeRegister(&xMessageDialogGetDefaultResponse, libs, "adw_message_dialog_get_default_response")
1290 core.PuregoSafeRegister(&xMessageDialogGetExtraChild, libs, "adw_message_dialog_get_extra_child")
1291 core.PuregoSafeRegister(&xMessageDialogGetHeading, libs, "adw_message_dialog_get_heading")
1292 core.PuregoSafeRegister(&xMessageDialogGetHeadingUseMarkup, libs, "adw_message_dialog_get_heading_use_markup")
1293 core.PuregoSafeRegister(&xMessageDialogGetResponseAppearance, libs, "adw_message_dialog_get_response_appearance")
1294 core.PuregoSafeRegister(&xMessageDialogGetResponseEnabled, libs, "adw_message_dialog_get_response_enabled")
1295 core.PuregoSafeRegister(&xMessageDialogGetResponseLabel, libs, "adw_message_dialog_get_response_label")
1296 core.PuregoSafeRegister(&xMessageDialogHasResponse, libs, "adw_message_dialog_has_response")
1297 core.PuregoSafeRegister(&xMessageDialogRemoveResponse, libs, "adw_message_dialog_remove_response")
1298 core.PuregoSafeRegister(&xMessageDialogResponse, libs, "adw_message_dialog_response")
1299 core.PuregoSafeRegister(&xMessageDialogSetBody, libs, "adw_message_dialog_set_body")
1300 core.PuregoSafeRegister(&xMessageDialogSetBodyUseMarkup, libs, "adw_message_dialog_set_body_use_markup")
1301 core.PuregoSafeRegister(&xMessageDialogSetCloseResponse, libs, "adw_message_dialog_set_close_response")
1302 core.PuregoSafeRegister(&xMessageDialogSetDefaultResponse, libs, "adw_message_dialog_set_default_response")
1303 core.PuregoSafeRegister(&xMessageDialogSetExtraChild, libs, "adw_message_dialog_set_extra_child")
1304 core.PuregoSafeRegister(&xMessageDialogSetHeading, libs, "adw_message_dialog_set_heading")
1305 core.PuregoSafeRegister(&xMessageDialogSetHeadingUseMarkup, libs, "adw_message_dialog_set_heading_use_markup")
1306 core.PuregoSafeRegister(&xMessageDialogSetResponseAppearance, libs, "adw_message_dialog_set_response_appearance")
1307 core.PuregoSafeRegister(&xMessageDialogSetResponseEnabled, libs, "adw_message_dialog_set_response_enabled")
1308 core.PuregoSafeRegister(&xMessageDialogSetResponseLabel, libs, "adw_message_dialog_set_response_label")
1309
1310}