v0.2.1 c0399be

adw-layout.go RawHistoryFolder

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/gobject"
12	"github.com/bnema/puregotk/v4/gobject/types"
13	"github.com/bnema/puregotk/v4/gtk"
14)
15
16type LayoutClass struct {
17	_ structs.HostLayout
18
19	ParentClass gobject.ObjectClass
20}
21
22func (x *LayoutClass) GoPointer() uintptr {
23	return uintptr(unsafe.Pointer(x))
24}
25
26// An individual layout in [class@MultiLayoutView].
27type Layout struct {
28	gobject.Object
29}
30
31var xLayoutGLibType func() types.GType
32
33func LayoutGLibType() types.GType {
34	return xLayoutGLibType()
35}
36
37func LayoutNewFromInternalPtr(ptr uintptr) *Layout {
38	cls := &Layout{}
39	cls.Ptr = ptr
40	return cls
41}
42
43var xNewLayout func(uintptr) uintptr
44
45// Creates a new `AdwLayout` that contains @content.
46func NewLayout(ContentVar *gtk.Widget) *Layout {
47	var cls *Layout
48
49	cret := xNewLayout(ContentVar.GoPointer())
50
51	if cret == 0 {
52		return nil
53	}
54	cls = &Layout{}
55	cls.Ptr = cret
56	return cls
57}
58
59var xLayoutGetContent func(uintptr) uintptr
60
61// Gets the content widget.
62func (x *Layout) GetContent() *gtk.Widget {
63	var cls *gtk.Widget
64
65	cret := xLayoutGetContent(x.GoPointer())
66
67	if cret == 0 {
68		return nil
69	}
70	gobject.IncreaseRef(cret)
71	cls = &gtk.Widget{}
72	cls.Ptr = cret
73	return cls
74}
75
76var xLayoutGetName func(uintptr) string
77
78// Gets the name of the layout.
79func (x *Layout) GetName() string {
80
81	cret := xLayoutGetName(x.GoPointer())
82	return cret
83}
84
85var xLayoutSetName func(uintptr, uintptr)
86
87// Sets the name of the layout.
88func (x *Layout) SetName(NameVar *string) {
89
90	NameVarPtr := core.GStrdupNullable(NameVar)
91	defer core.GFreeNullable(NameVarPtr)
92
93	xLayoutSetName(x.GoPointer(), NameVarPtr)
94
95}
96
97func (c *Layout) GoPointer() uintptr {
98	if c == nil {
99		return 0
100	}
101	return c.Ptr
102}
103
104func (c *Layout) SetGoPointer(ptr uintptr) {
105	c.Ptr = ptr
106}
107
108// SetPropertyName sets the "name" property.
109// The name of the layout.
110func (x *Layout) SetPropertyName(value string) {
111	var v gobject.Value
112	v.Init(gobject.TypeStringVal)
113	v.SetString(&value)
114	x.SetProperty("name", &v)
115}
116
117// GetPropertyName gets the "name" property.
118// The name of the layout.
119func (x *Layout) GetPropertyName() string {
120	var v gobject.Value
121	x.GetProperty("name", &v)
122	return v.GetString()
123}
124
125// Gets the ID of the @buildable object.
126//
127// `GtkBuilder` sets the name based on the ID attribute
128// of the `<object>` tag used to construct the @buildable.
129func (x *Layout) GetBuildableId() string {
130
131	cret := gtk.XGtkBuildableGetBuildableId(x.GoPointer())
132	return cret
133}
134
135func init() {
136	core.SetPackageName("ADW", "libadwaita-1")
137	core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0"})
138	var libs []uintptr
139	for _, libPath := range core.GetPaths("ADW") {
140		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
141		if err != nil {
142			panic(err)
143		}
144		libs = append(libs, lib)
145	}
146
147	core.PuregoSafeRegister(&xLayoutGLibType, libs, "adw_layout_get_type")
148
149	core.PuregoSafeRegister(&xNewLayout, libs, "adw_layout_new")
150
151	core.PuregoSafeRegister(&xLayoutGetContent, libs, "adw_layout_get_content")
152	core.PuregoSafeRegister(&xLayoutGetName, libs, "adw_layout_get_name")
153	core.PuregoSafeRegister(&xLayoutSetName, libs, "adw_layout_set_name")
154
155}

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