summaryrefslogtreecommitdiff
path: root/vendor/github.com/gotk3/gotk3/gtk/shortcutswindow_since_3_22.go
blob: ea98302a2a8d18b0cd3a05164526a60c64a20d20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
// +build !gtk_3_6,!gtk_3_8,!gtk_3_10,!gtk_3_12,!gtk_3_14,!gtk_3_16,!gtk_3_18,!gtk_3_20

package gtk

// #include <gtk/gtk.h>
// #include "gtk.go.h"
// #include "shortcutswindow_since_3_22.go.h"
import "C"
import (
	"unsafe"

	"github.com/gotk3/gotk3/glib"
)

func init() {
	tm := []glib.TypeMarshaler{
		{glib.Type(C.gtk_shortcuts_window_get_type()), marshalShortcutsWindow},
		{glib.Type(C.gtk_shortcuts_section_get_type()), marshalShortcutsSection},
		{glib.Type(C.gtk_shortcuts_group_get_type()), marshalShortcutsGroup},
		{glib.Type(C.gtk_shortcuts_shortcut_get_type()), marshalShortcutsShortcut},
	}

	glib.RegisterGValueMarshalers(tm)

	WrapMap["GtkShortcutsWindow"] = wrapShortcutsWindow
	WrapMap["GtkShortcutsSection"] = wrapShortcutsSection
	WrapMap["GtkShortcutsGroup"] = wrapShortcutsGroup
	WrapMap["GtkShortcutsShortcut"] = wrapShortcutsShortcut
}

/*
 * GtkShortcutsWindow
 */

// ShortcutsWindow is a representation of GTK's GtkShortcutsWindow.
type ShortcutsWindow struct {
	Window
}

func (v *ShortcutsWindow) native() *C.GtkShortcutsWindow {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsWindow(p)
}

func marshalShortcutsWindow(p uintptr) (interface{}, error) {
	c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
	obj := glib.Take(unsafe.Pointer(c))
	return wrapShortcutsWindow(obj), nil
}

func wrapShortcutsWindow(obj *glib.Object) *ShortcutsWindow {
	return &ShortcutsWindow{Window{Bin{Container{Widget{glib.InitiallyUnowned{obj}}}}}}
}

/*
 * GtkShortcutsSection
 */

// ShortcutsWindow is a representation of GTK's GtkShortcutsSection.
type ShortcutsSection struct {
	Box
}

// native returns a pointer to the underlying GtkShortcutsSection.
func (v *ShortcutsSection) native() *C.GtkShortcutsSection {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsSection(p)
}

func marshalShortcutsSection(p uintptr) (interface{}, error) {
	c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
	obj := glib.Take(unsafe.Pointer(c))
	return wrapShortcutsSection(obj), nil
}

func wrapShortcutsSection(obj *glib.Object) *ShortcutsSection {
	return &ShortcutsSection{Box{Container{Widget{glib.InitiallyUnowned{obj}}}}}
}

/*
 * GtkShortcutsSection
 */

// ShortcutsWindow is a representation of GTK's GtkShortcutsGroup.
type ShortcutsGroup struct {
	Box
}

// native returns a pointer to the underlying GtkShortcutsGroup.
func (v *ShortcutsGroup) native() *C.GtkShortcutsGroup {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsGroup(p)
}

func marshalShortcutsGroup(p uintptr) (interface{}, error) {
	c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
	obj := glib.Take(unsafe.Pointer(c))
	return wrapShortcutsGroup(obj), nil
}

func wrapShortcutsGroup(obj *glib.Object) *ShortcutsGroup {
	return &ShortcutsGroup{Box{Container{Widget{glib.InitiallyUnowned{obj}}}}}
}

/*
 * GtkShortcutsShortcut
 */

// ShortcutsWindow is a representation of GTK's GtkShortcutsShortcut.
type ShortcutsShortcut struct {
	Box
}

// native returns a pointer to the underlying GtkShortcutsShortcut.
func (v *ShortcutsShortcut) native() *C.GtkShortcutsShortcut {
	if v == nil || v.GObject == nil {
		return nil
	}
	p := unsafe.Pointer(v.GObject)
	return C.toGtkShortcutsShortcut(p)
}

func marshalShortcutsShortcut(p uintptr) (interface{}, error) {
	c := C.g_value_get_object((*C.GValue)(unsafe.Pointer(p)))
	obj := glib.Take(unsafe.Pointer(c))
	return wrapShortcutsShortcut(obj), nil
}

func wrapShortcutsShortcut(obj *glib.Object) *ShortcutsShortcut {
	return &ShortcutsShortcut{Box{Container{Widget{glib.InitiallyUnowned{obj}}}}}
}