v0.2.1 c0399be

gtkcalendar.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"unsafe"
6
7	"github.com/ebitengine/purego"
8
9	"github.com/bnema/puregotk/pkg/core"
10	"github.com/bnema/puregotk/v4/glib"
11	"github.com/bnema/puregotk/v4/gobject"
12	"github.com/bnema/puregotk/v4/gobject/types"
13)
14
15// Displays a Gregorian calendar, one month at a time.
16//
17// <picture>
18//
19//	<source srcset="calendar-dark.png" media="(prefers-color-scheme: dark)">
20//	<img alt="An example GtkCalendar" src="calendar.png">
21//
22// </picture>
23//
24// A `GtkCalendar` can be created with [ctor@Gtk.Calendar.new].
25//
26// The selected date can be retrieved from a `GtkCalendar` using
27// [method@Gtk.Calendar.get_date].
28// It can be altered with [method@Gtk.Calendar.set_date].
29//
30// To place a visual marker on a particular day, use
31// [method@Gtk.Calendar.mark_day] and to remove the marker,
32// [method@Gtk.Calendar.unmark_day]. Alternative, all
33// marks can be cleared with [method@Gtk.Calendar.clear_marks].
34//
35// Users should be aware that, although the Gregorian calendar is the
36// legal calendar in most countries, it was adopted progressively
37// between 1582 and 1929. Display before these dates is likely to be
38// historically incorrect.
39//
40// # Shortcuts and Gestures
41//
42// `GtkCalendar` supports the following gestures:
43//
44// - Scrolling up or down will switch to the previous or next month.
45// - Date strings can be dropped for setting the current day.
46//
47// # CSS nodes
48//
49// ```
50// calendar.view
51// ├── header
52// │   ├── button
53// │   ├── stack.month
54// │   ├── button
55// │   ├── button
56// │   ├── label.year
57// │   ╰── button
58// ╰── grid
59//
60//	╰── label[.day-name][.week-number][.day-number][.other-month][.today]
61//
62// ```
63//
64// `GtkCalendar` has a main node with name calendar. It contains a subnode
65// called header containing the widgets for switching between years and months.
66//
67// The grid subnode contains all day labels, including week numbers on the left
68// (marked with the .week-number css class) and day names on top (marked with the
69// .day-name css class).
70//
71// Day labels that belong to the previous or next month get the .other-month
72// style class. The label of the current day get the .today style class.
73//
74// Marked day labels get the :selected state assigned.
75type Calendar struct {
76	Widget
77}
78
79var xCalendarGLibType func() types.GType
80
81func CalendarGLibType() types.GType {
82	return xCalendarGLibType()
83}
84
85func CalendarNewFromInternalPtr(ptr uintptr) *Calendar {
86	cls := &Calendar{}
87	cls.Ptr = ptr
88	return cls
89}
90
91var xNewCalendar func() uintptr
92
93// Creates a new calendar, with the current date being selected.
94func NewCalendar() *Calendar {
95	var cls *Calendar
96
97	cret := xNewCalendar()
98
99	if cret == 0 {
100		return nil
101	}
102	gobject.IncreaseRef(cret)
103	cls = &Calendar{}
104	cls.Ptr = cret
105	return cls
106}
107
108var xCalendarClearMarks func(uintptr)
109
110// Remove all visual markers.
111func (x *Calendar) ClearMarks() {
112
113	xCalendarClearMarks(x.GoPointer())
114
115}
116
117var xCalendarGetDate func(uintptr) *glib.DateTime
118
119// Returns a `GDateTime` representing the shown
120// year, month and the selected day.
121//
122// The returned date is in the local time zone.
123func (x *Calendar) GetDate() *glib.DateTime {
124
125	cret := xCalendarGetDate(x.GoPointer())
126	return cret
127}
128
129var xCalendarGetDay func(uintptr) int
130
131// Gets the day of the selected date.
132func (x *Calendar) GetDay() int {
133
134	cret := xCalendarGetDay(x.GoPointer())
135	return cret
136}
137
138var xCalendarGetDayIsMarked func(uintptr, uint) bool
139
140// Returns if the @day of the @calendar is already marked.
141func (x *Calendar) GetDayIsMarked(DayVar uint) bool {
142
143	cret := xCalendarGetDayIsMarked(x.GoPointer(), DayVar)
144	return cret
145}
146
147var xCalendarGetMonth func(uintptr) int
148
149// Gets the month of the selected date.
150func (x *Calendar) GetMonth() int {
151
152	cret := xCalendarGetMonth(x.GoPointer())
153	return cret
154}
155
156var xCalendarGetShowDayNames func(uintptr) bool
157
158// Returns whether @self is currently showing the names
159// of the week days.
160//
161// This is the value of the [property@Gtk.Calendar:show-day-names]
162// property.
163func (x *Calendar) GetShowDayNames() bool {
164
165	cret := xCalendarGetShowDayNames(x.GoPointer())
166	return cret
167}
168
169var xCalendarGetShowHeading func(uintptr) bool
170
171// Returns whether @self is currently showing the heading.
172//
173// This is the value of the [property@Gtk.Calendar:show-heading]
174// property.
175func (x *Calendar) GetShowHeading() bool {
176
177	cret := xCalendarGetShowHeading(x.GoPointer())
178	return cret
179}
180
181var xCalendarGetShowWeekNumbers func(uintptr) bool
182
183// Returns whether @self is showing week numbers right
184// now.
185//
186// This is the value of the [property@Gtk.Calendar:show-week-numbers]
187// property.
188func (x *Calendar) GetShowWeekNumbers() bool {
189
190	cret := xCalendarGetShowWeekNumbers(x.GoPointer())
191	return cret
192}
193
194var xCalendarGetYear func(uintptr) int
195
196// Gets the year of the selected date.
197func (x *Calendar) GetYear() int {
198
199	cret := xCalendarGetYear(x.GoPointer())
200	return cret
201}
202
203var xCalendarMarkDay func(uintptr, uint)
204
205// Places a visual marker on a particular day of the current month.
206func (x *Calendar) MarkDay(DayVar uint) {
207
208	xCalendarMarkDay(x.GoPointer(), DayVar)
209
210}
211
212var xCalendarSelectDay func(uintptr, *glib.DateTime)
213
214// Switches to @date's year and month and select its day.
215func (x *Calendar) SelectDay(DateVar *glib.DateTime) {
216
217	xCalendarSelectDay(x.GoPointer(), DateVar)
218
219}
220
221var xCalendarSetDate func(uintptr, *glib.DateTime)
222
223// Switches to @date's year and month and selects its day.
224func (x *Calendar) SetDate(DateVar *glib.DateTime) {
225
226	xCalendarSetDate(x.GoPointer(), DateVar)
227
228}
229
230var xCalendarSetDay func(uintptr, int)
231
232// Sets the day for the selected date.
233//
234// The new date must be valid. For example, setting the day to 31 when the
235// month is February will fail.
236func (x *Calendar) SetDay(DayVar int) {
237
238	xCalendarSetDay(x.GoPointer(), DayVar)
239
240}
241
242var xCalendarSetMonth func(uintptr, int)
243
244// Sets the month for the selected date.
245//
246// The new date must be valid. For example, setting the month to 1 (February)
247// when the day is 31 will fail.
248func (x *Calendar) SetMonth(MonthVar int) {
249
250	xCalendarSetMonth(x.GoPointer(), MonthVar)
251
252}
253
254var xCalendarSetShowDayNames func(uintptr, bool)
255
256// Sets whether the calendar shows day names.
257func (x *Calendar) SetShowDayNames(ValueVar bool) {
258
259	xCalendarSetShowDayNames(x.GoPointer(), ValueVar)
260
261}
262
263var xCalendarSetShowHeading func(uintptr, bool)
264
265// Sets whether the calendar should show a heading.
266//
267// The heading contains the current year and month as well as
268// buttons for changing both.
269func (x *Calendar) SetShowHeading(ValueVar bool) {
270
271	xCalendarSetShowHeading(x.GoPointer(), ValueVar)
272
273}
274
275var xCalendarSetShowWeekNumbers func(uintptr, bool)
276
277// Sets whether week numbers are shown in the calendar.
278func (x *Calendar) SetShowWeekNumbers(ValueVar bool) {
279
280	xCalendarSetShowWeekNumbers(x.GoPointer(), ValueVar)
281
282}
283
284var xCalendarSetYear func(uintptr, int)
285
286// Sets the year for the selected date.
287//
288// The new date must be valid. For example, setting the year to 2023 when the
289// date is February 29 will fail.
290func (x *Calendar) SetYear(YearVar int) {
291
292	xCalendarSetYear(x.GoPointer(), YearVar)
293
294}
295
296var xCalendarUnmarkDay func(uintptr, uint)
297
298// Removes the visual marker from a particular day.
299func (x *Calendar) UnmarkDay(DayVar uint) {
300
301	xCalendarUnmarkDay(x.GoPointer(), DayVar)
302
303}
304
305func (c *Calendar) GoPointer() uintptr {
306	if c == nil {
307		return 0
308	}
309	return c.Ptr
310}
311
312func (c *Calendar) SetGoPointer(ptr uintptr) {
313	c.Ptr = ptr
314}
315
316// SetPropertyDate sets the "date" property.
317// The selected date.
318//
319// This property gets initially set to the current date.
320func (x *Calendar) SetPropertyDate(value uintptr) {
321	var v gobject.Value
322	v.Init(gobject.TypePointerVal)
323	v.SetPointer(value)
324	x.SetProperty("date", &v)
325}
326
327// GetPropertyDate gets the "date" property.
328// The selected date.
329//
330// This property gets initially set to the current date.
331func (x *Calendar) GetPropertyDate() uintptr {
332	var v gobject.Value
333	x.GetProperty("date", &v)
334	return v.GetPointer()
335}
336
337// SetPropertyDay sets the "day" property.
338// The selected day (as a number between 1 and 31).
339func (x *Calendar) SetPropertyDay(value int) {
340	var v gobject.Value
341	v.Init(gobject.TypeIntVal)
342	v.SetInt(value)
343	x.SetProperty("day", &v)
344}
345
346// GetPropertyDay gets the "day" property.
347// The selected day (as a number between 1 and 31).
348func (x *Calendar) GetPropertyDay() int {
349	var v gobject.Value
350	x.GetProperty("day", &v)
351	return v.GetInt()
352}
353
354// SetPropertyMonth sets the "month" property.
355// The selected month (as a number between 0 and 11).
356//
357// This property gets initially set to the current month.
358func (x *Calendar) SetPropertyMonth(value int) {
359	var v gobject.Value
360	v.Init(gobject.TypeIntVal)
361	v.SetInt(value)
362	x.SetProperty("month", &v)
363}
364
365// GetPropertyMonth gets the "month" property.
366// The selected month (as a number between 0 and 11).
367//
368// This property gets initially set to the current month.
369func (x *Calendar) GetPropertyMonth() int {
370	var v gobject.Value
371	x.GetProperty("month", &v)
372	return v.GetInt()
373}
374
375// SetPropertyShowDayNames sets the "show-day-names" property.
376// Determines whether day names are displayed.
377func (x *Calendar) SetPropertyShowDayNames(value bool) {
378	var v gobject.Value
379	v.Init(gobject.TypeBooleanVal)
380	v.SetBoolean(value)
381	x.SetProperty("show-day-names", &v)
382}
383
384// GetPropertyShowDayNames gets the "show-day-names" property.
385// Determines whether day names are displayed.
386func (x *Calendar) GetPropertyShowDayNames() bool {
387	var v gobject.Value
388	x.GetProperty("show-day-names", &v)
389	return v.GetBoolean()
390}
391
392// SetPropertyShowHeading sets the "show-heading" property.
393// Determines whether a heading is displayed.
394func (x *Calendar) SetPropertyShowHeading(value bool) {
395	var v gobject.Value
396	v.Init(gobject.TypeBooleanVal)
397	v.SetBoolean(value)
398	x.SetProperty("show-heading", &v)
399}
400
401// GetPropertyShowHeading gets the "show-heading" property.
402// Determines whether a heading is displayed.
403func (x *Calendar) GetPropertyShowHeading() bool {
404	var v gobject.Value
405	x.GetProperty("show-heading", &v)
406	return v.GetBoolean()
407}
408
409// SetPropertyShowWeekNumbers sets the "show-week-numbers" property.
410// Determines whether week numbers are displayed.
411func (x *Calendar) SetPropertyShowWeekNumbers(value bool) {
412	var v gobject.Value
413	v.Init(gobject.TypeBooleanVal)
414	v.SetBoolean(value)
415	x.SetProperty("show-week-numbers", &v)
416}
417
418// GetPropertyShowWeekNumbers gets the "show-week-numbers" property.
419// Determines whether week numbers are displayed.
420func (x *Calendar) GetPropertyShowWeekNumbers() bool {
421	var v gobject.Value
422	x.GetProperty("show-week-numbers", &v)
423	return v.GetBoolean()
424}
425
426// SetPropertyYear sets the "year" property.
427// The selected year.
428//
429// This property gets initially set to the current year.
430func (x *Calendar) SetPropertyYear(value int) {
431	var v gobject.Value
432	v.Init(gobject.TypeIntVal)
433	v.SetInt(value)
434	x.SetProperty("year", &v)
435}
436
437// GetPropertyYear gets the "year" property.
438// The selected year.
439//
440// This property gets initially set to the current year.
441func (x *Calendar) GetPropertyYear() int {
442	var v gobject.Value
443	x.GetProperty("year", &v)
444	return v.GetInt()
445}
446
447// Emitted when the user selects a day.
448func (x *Calendar) ConnectDaySelected(cb *func(Calendar)) uint {
449	cbPtr := uintptr(unsafe.Pointer(cb))
450	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
451		handlerID := gobject.SignalConnect(x.GoPointer(), "day-selected", cbRefPtr)
452		glib.SaveHandlerMapping(handlerID, cbPtr)
453		return handlerID
454	}
455
456	fcb := func(clsPtr uintptr) {
457		fa := Calendar{}
458		fa.Ptr = clsPtr
459		cbFn := *cb
460
461		cbFn(fa)
462
463	}
464	cbRefPtr := purego.NewCallback(fcb)
465	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
466	handlerID := gobject.SignalConnect(x.GoPointer(), "day-selected", cbRefPtr)
467	glib.SaveHandlerMapping(handlerID, cbPtr)
468	return handlerID
469}
470
471// Emitted when the user switches to the next month.
472func (x *Calendar) ConnectNextMonth(cb *func(Calendar)) uint {
473	cbPtr := uintptr(unsafe.Pointer(cb))
474	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
475		handlerID := gobject.SignalConnect(x.GoPointer(), "next-month", cbRefPtr)
476		glib.SaveHandlerMapping(handlerID, cbPtr)
477		return handlerID
478	}
479
480	fcb := func(clsPtr uintptr) {
481		fa := Calendar{}
482		fa.Ptr = clsPtr
483		cbFn := *cb
484
485		cbFn(fa)
486
487	}
488	cbRefPtr := purego.NewCallback(fcb)
489	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
490	handlerID := gobject.SignalConnect(x.GoPointer(), "next-month", cbRefPtr)
491	glib.SaveHandlerMapping(handlerID, cbPtr)
492	return handlerID
493}
494
495// Emitted when user switches to the next year.
496func (x *Calendar) ConnectNextYear(cb *func(Calendar)) uint {
497	cbPtr := uintptr(unsafe.Pointer(cb))
498	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
499		handlerID := gobject.SignalConnect(x.GoPointer(), "next-year", cbRefPtr)
500		glib.SaveHandlerMapping(handlerID, cbPtr)
501		return handlerID
502	}
503
504	fcb := func(clsPtr uintptr) {
505		fa := Calendar{}
506		fa.Ptr = clsPtr
507		cbFn := *cb
508
509		cbFn(fa)
510
511	}
512	cbRefPtr := purego.NewCallback(fcb)
513	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
514	handlerID := gobject.SignalConnect(x.GoPointer(), "next-year", cbRefPtr)
515	glib.SaveHandlerMapping(handlerID, cbPtr)
516	return handlerID
517}
518
519// Emitted when the user switches to the previous month.
520func (x *Calendar) ConnectPrevMonth(cb *func(Calendar)) uint {
521	cbPtr := uintptr(unsafe.Pointer(cb))
522	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
523		handlerID := gobject.SignalConnect(x.GoPointer(), "prev-month", cbRefPtr)
524		glib.SaveHandlerMapping(handlerID, cbPtr)
525		return handlerID
526	}
527
528	fcb := func(clsPtr uintptr) {
529		fa := Calendar{}
530		fa.Ptr = clsPtr
531		cbFn := *cb
532
533		cbFn(fa)
534
535	}
536	cbRefPtr := purego.NewCallback(fcb)
537	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
538	handlerID := gobject.SignalConnect(x.GoPointer(), "prev-month", cbRefPtr)
539	glib.SaveHandlerMapping(handlerID, cbPtr)
540	return handlerID
541}
542
543// Emitted when user switches to the previous year.
544func (x *Calendar) ConnectPrevYear(cb *func(Calendar)) uint {
545	cbPtr := uintptr(unsafe.Pointer(cb))
546	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
547		handlerID := gobject.SignalConnect(x.GoPointer(), "prev-year", cbRefPtr)
548		glib.SaveHandlerMapping(handlerID, cbPtr)
549		return handlerID
550	}
551
552	fcb := func(clsPtr uintptr) {
553		fa := Calendar{}
554		fa.Ptr = clsPtr
555		cbFn := *cb
556
557		cbFn(fa)
558
559	}
560	cbRefPtr := purego.NewCallback(fcb)
561	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
562	handlerID := gobject.SignalConnect(x.GoPointer(), "prev-year", cbRefPtr)
563	glib.SaveHandlerMapping(handlerID, cbPtr)
564	return handlerID
565}
566
567// Requests the user's screen reader to announce the given message.
568//
569// This kind of notification is useful for messages that
570// either have only a visual representation or that are not
571// exposed visually at all, e.g. a notification about a
572// successful operation.
573//
574// Also, by using this API, you can ensure that the message
575// does not interrupts the user's current screen reader output.
576func (x *Calendar) Announce(MessageVar string, PriorityVar AccessibleAnnouncementPriority) {
577
578	XGtkAccessibleAnnounce(x.GoPointer(), MessageVar, PriorityVar)
579
580}
581
582// Retrieves the accessible parent for an accessible object.
583//
584// This function returns `NULL` for top level widgets.
585func (x *Calendar) GetAccessibleParent() *AccessibleBase {
586	var cls *AccessibleBase
587
588	cret := XGtkAccessibleGetAccessibleParent(x.GoPointer())
589
590	if cret == 0 {
591		return nil
592	}
593	cls = &AccessibleBase{}
594	cls.Ptr = cret
595	return cls
596}
597
598// Retrieves the accessible role of an accessible object.
599func (x *Calendar) GetAccessibleRole() AccessibleRole {
600
601	cret := XGtkAccessibleGetAccessibleRole(x.GoPointer())
602	return cret
603}
604
605// Retrieves the implementation for the given accessible object.
606func (x *Calendar) GetAtContext() *ATContext {
607	var cls *ATContext
608
609	cret := XGtkAccessibleGetAtContext(x.GoPointer())
610
611	if cret == 0 {
612		return nil
613	}
614	cls = &ATContext{}
615	cls.Ptr = cret
616	return cls
617}
618
619// Queries the coordinates and dimensions of this accessible
620//
621// This functionality can be overridden by `GtkAccessible`
622// implementations, e.g. to get the bounds from an ignored
623// child widget.
624func (x *Calendar) GetBounds(XVar *int, YVar *int, WidthVar *int, HeightVar *int) bool {
625
626	cret := XGtkAccessibleGetBounds(x.GoPointer(), XVar, YVar, WidthVar, HeightVar)
627	return cret
628}
629
630// Retrieves the first accessible child of an accessible object.
631func (x *Calendar) GetFirstAccessibleChild() *AccessibleBase {
632	var cls *AccessibleBase
633
634	cret := XGtkAccessibleGetFirstAccessibleChild(x.GoPointer())
635
636	if cret == 0 {
637		return nil
638	}
639	cls = &AccessibleBase{}
640	cls.Ptr = cret
641	return cls
642}
643
644// Retrieves the next accessible sibling of an accessible object
645func (x *Calendar) GetNextAccessibleSibling() *AccessibleBase {
646	var cls *AccessibleBase
647
648	cret := XGtkAccessibleGetNextAccessibleSibling(x.GoPointer())
649
650	if cret == 0 {
651		return nil
652	}
653	cls = &AccessibleBase{}
654	cls.Ptr = cret
655	return cls
656}
657
658// Queries a platform state, such as focus.
659//
660// This functionality can be overridden by `GtkAccessible`
661// implementations, e.g. to get platform state from an ignored
662// child widget, as is the case for `GtkText` wrappers.
663func (x *Calendar) GetPlatformState(StateVar AccessiblePlatformState) bool {
664
665	cret := XGtkAccessibleGetPlatformState(x.GoPointer(), StateVar)
666	return cret
667}
668
669// Resets the accessible property to its default value.
670func (x *Calendar) ResetProperty(PropertyVar AccessibleProperty) {
671
672	XGtkAccessibleResetProperty(x.GoPointer(), PropertyVar)
673
674}
675
676// Resets the accessible relation to its default value.
677func (x *Calendar) ResetRelation(RelationVar AccessibleRelation) {
678
679	XGtkAccessibleResetRelation(x.GoPointer(), RelationVar)
680
681}
682
683// Resets the accessible state to its default value.
684func (x *Calendar) ResetState(StateVar AccessibleState) {
685
686	XGtkAccessibleResetState(x.GoPointer(), StateVar)
687
688}
689
690// Sets the parent and sibling of an accessible object.
691//
692// This function is meant to be used by accessible implementations that are
693// not part of the widget hierarchy, and but act as a logical bridge between
694// widgets. For instance, if a widget creates an object that holds metadata
695// for each child, and you want that object to implement the `GtkAccessible`
696// interface, you will use this function to ensure that the parent of each
697// child widget is the metadata object, and the parent of each metadata
698// object is the container widget.
699func (x *Calendar) SetAccessibleParent(ParentVar Accessible, NextSiblingVar Accessible) {
700
701	XGtkAccessibleSetAccessibleParent(x.GoPointer(), ParentVar.GoPointer(), NextSiblingVar.GoPointer())
702
703}
704
705// Updates the next accessible sibling.
706//
707// That might be useful when a new child of a custom accessible
708// is created, and it needs to be linked to a previous child.
709func (x *Calendar) UpdateNextAccessibleSibling(NewSiblingVar Accessible) {
710
711	XGtkAccessibleUpdateNextAccessibleSibling(x.GoPointer(), NewSiblingVar.GoPointer())
712
713}
714
715// Informs ATs that the platform state has changed.
716//
717// This function should be used by `GtkAccessible` implementations that
718// have a platform state but are not widgets. Widgets handle platform
719// states automatically.
720func (x *Calendar) UpdatePlatformState(StateVar AccessiblePlatformState) {
721
722	XGtkAccessibleUpdatePlatformState(x.GoPointer(), StateVar)
723
724}
725
726// Updates a list of accessible properties.
727//
728// See the [enum@Gtk.AccessibleProperty] documentation for the
729// value types of accessible properties.
730//
731// This function should be called by `GtkWidget` types whenever
732// an accessible property change must be communicated to assistive
733// technologies.
734//
735// Example:
736// ```c
737// value = gtk_adjustment_get_value (adjustment);
738// gtk_accessible_update_property (GTK_ACCESSIBLE (spin_button),
739//
740//	GTK_ACCESSIBLE_PROPERTY_VALUE_NOW, value,
741//	-1);
742//
743// ```
744func (x *Calendar) UpdateProperty(FirstPropertyVar AccessibleProperty, varArgs ...interface{}) {
745
746	XGtkAccessibleUpdateProperty(x.GoPointer(), FirstPropertyVar, varArgs...)
747
748}
749
750// Updates an array of accessible properties.
751//
752// This function should be called by `GtkWidget` types whenever an accessible
753// property change must be communicated to assistive technologies.
754//
755// This function is meant to be used by language bindings.
756func (x *Calendar) UpdatePropertyValue(NPropertiesVar int, PropertiesVar []AccessibleProperty, ValuesVar []gobject.Value) {
757
758	XGtkAccessibleUpdatePropertyValue(x.GoPointer(), NPropertiesVar, PropertiesVar, ValuesVar)
759
760}
761
762// Updates a list of accessible relations.
763//
764// This function should be called by `GtkWidget` types whenever an accessible
765// relation change must be communicated to assistive technologies.
766//
767// If the [enum@Gtk.AccessibleRelation] requires a list of references,
768// you should pass each reference individually, followed by `NULL`, e.g.
769//
770// ```c
771// gtk_accessible_update_relation (accessible,
772//
773//	GTK_ACCESSIBLE_RELATION_CONTROLS,
774//	  ref1, NULL,
775//	GTK_ACCESSIBLE_RELATION_LABELLED_BY,
776//	  ref1, ref2, ref3, NULL,
777//	-1);
778//
779// ```
780func (x *Calendar) UpdateRelation(FirstRelationVar AccessibleRelation, varArgs ...interface{}) {
781
782	XGtkAccessibleUpdateRelation(x.GoPointer(), FirstRelationVar, varArgs...)
783
784}
785
786// Updates an array of accessible relations.
787//
788// This function should be called by `GtkWidget` types whenever an accessible
789// relation change must be communicated to assistive technologies.
790//
791// This function is meant to be used by language bindings.
792func (x *Calendar) UpdateRelationValue(NRelationsVar int, RelationsVar []AccessibleRelation, ValuesVar []gobject.Value) {
793
794	XGtkAccessibleUpdateRelationValue(x.GoPointer(), NRelationsVar, RelationsVar, ValuesVar)
795
796}
797
798// Updates a list of accessible states.
799//
800// See the [enum@Gtk.AccessibleState] documentation for the
801// value types of accessible states.
802//
803// This function should be called by `GtkWidget` types whenever
804// an accessible state change must be communicated to assistive
805// technologies.
806//
807// Example:
808//
809// ```c
810// value = GTK_ACCESSIBLE_TRISTATE_MIXED;
811// gtk_accessible_update_state (GTK_ACCESSIBLE (check_button),
812//
813//	GTK_ACCESSIBLE_STATE_CHECKED, value,
814//	-1);
815//
816// ```
817func (x *Calendar) UpdateState(FirstStateVar AccessibleState, varArgs ...interface{}) {
818
819	XGtkAccessibleUpdateState(x.GoPointer(), FirstStateVar, varArgs...)
820
821}
822
823// Updates an array of accessible states.
824//
825// This function should be called by `GtkWidget` types whenever an accessible
826// state change must be communicated to assistive technologies.
827//
828// This function is meant to be used by language bindings.
829func (x *Calendar) UpdateStateValue(NStatesVar int, StatesVar []AccessibleState, ValuesVar []gobject.Value) {
830
831	XGtkAccessibleUpdateStateValue(x.GoPointer(), NStatesVar, StatesVar, ValuesVar)
832
833}
834
835// Gets the ID of the @buildable object.
836//
837// `GtkBuilder` sets the name based on the ID attribute
838// of the `<object>` tag used to construct the @buildable.
839func (x *Calendar) GetBuildableId() string {
840
841	cret := XGtkBuildableGetBuildableId(x.GoPointer())
842	return cret
843}
844
845func init() {
846	core.SetPackageName("GTK", "gtk4")
847	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
848	var libs []uintptr
849	for _, libPath := range core.GetPaths("GTK") {
850		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
851		if err != nil {
852			panic(err)
853		}
854		libs = append(libs, lib)
855	}
856
857	core.PuregoSafeRegister(&xCalendarGLibType, libs, "gtk_calendar_get_type")
858
859	core.PuregoSafeRegister(&xNewCalendar, libs, "gtk_calendar_new")
860
861	core.PuregoSafeRegister(&xCalendarClearMarks, libs, "gtk_calendar_clear_marks")
862	core.PuregoSafeRegister(&xCalendarGetDate, libs, "gtk_calendar_get_date")
863	core.PuregoSafeRegister(&xCalendarGetDay, libs, "gtk_calendar_get_day")
864	core.PuregoSafeRegister(&xCalendarGetDayIsMarked, libs, "gtk_calendar_get_day_is_marked")
865	core.PuregoSafeRegister(&xCalendarGetMonth, libs, "gtk_calendar_get_month")
866	core.PuregoSafeRegister(&xCalendarGetShowDayNames, libs, "gtk_calendar_get_show_day_names")
867	core.PuregoSafeRegister(&xCalendarGetShowHeading, libs, "gtk_calendar_get_show_heading")
868	core.PuregoSafeRegister(&xCalendarGetShowWeekNumbers, libs, "gtk_calendar_get_show_week_numbers")
869	core.PuregoSafeRegister(&xCalendarGetYear, libs, "gtk_calendar_get_year")
870	core.PuregoSafeRegister(&xCalendarMarkDay, libs, "gtk_calendar_mark_day")
871	core.PuregoSafeRegister(&xCalendarSelectDay, libs, "gtk_calendar_select_day")
872	core.PuregoSafeRegister(&xCalendarSetDate, libs, "gtk_calendar_set_date")
873	core.PuregoSafeRegister(&xCalendarSetDay, libs, "gtk_calendar_set_day")
874	core.PuregoSafeRegister(&xCalendarSetMonth, libs, "gtk_calendar_set_month")
875	core.PuregoSafeRegister(&xCalendarSetShowDayNames, libs, "gtk_calendar_set_show_day_names")
876	core.PuregoSafeRegister(&xCalendarSetShowHeading, libs, "gtk_calendar_set_show_heading")
877	core.PuregoSafeRegister(&xCalendarSetShowWeekNumbers, libs, "gtk_calendar_set_show_week_numbers")
878	core.PuregoSafeRegister(&xCalendarSetYear, libs, "gtk_calendar_set_year")
879	core.PuregoSafeRegister(&xCalendarUnmarkDay, libs, "gtk_calendar_unmark_day")
880
881}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close