v0.2.1 c0399be

gdktoplevellayout.go RawHistoryFolder

1// Package gdk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gdk
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)
14
15// Contains information that is necessary to present a sovereign
16// window on screen.
17//
18// The `GdkToplevelLayout` struct is necessary for using
19// [method@Gdk.Toplevel.present].
20//
21// Toplevel surfaces are sovereign windows that can be presented
22// to the user in various states (maximized, on all workspaces,
23// etc).
24type ToplevelLayout struct {
25	_ structs.HostLayout
26}
27
28var xToplevelLayoutGLibType func() types.GType
29
30func ToplevelLayoutGLibType() types.GType {
31	return xToplevelLayoutGLibType()
32}
33
34func (x *ToplevelLayout) GoPointer() uintptr {
35	return uintptr(unsafe.Pointer(x))
36}
37
38var xNewToplevelLayout func() *ToplevelLayout
39
40// Create a toplevel layout description.
41//
42// Used together with [method@Gdk.Toplevel.present] to describe
43// how a toplevel surface should be placed and behave on-screen.
44//
45// The size is in ”application pixels”, not
46// ”device pixels” (see [method@Gdk.Surface.get_scale]).
47func NewToplevelLayout() *ToplevelLayout {
48
49	cret := xNewToplevelLayout()
50	return cret
51}
52
53var xToplevelLayoutCopy func(uintptr) *ToplevelLayout
54
55// Create a new `GdkToplevelLayout` and copy the contents of @layout into it.
56func (x *ToplevelLayout) Copy() *ToplevelLayout {
57
58	cret := xToplevelLayoutCopy(x.GoPointer())
59	return cret
60}
61
62var xToplevelLayoutEqual func(uintptr, *ToplevelLayout) bool
63
64// Check whether @layout and @other has identical layout properties.
65func (x *ToplevelLayout) Equal(OtherVar *ToplevelLayout) bool {
66
67	cret := xToplevelLayoutEqual(x.GoPointer(), OtherVar)
68	return cret
69}
70
71var xToplevelLayoutGetFullscreen func(uintptr, *bool) bool
72
73// If the layout specifies whether to the toplevel should go fullscreen,
74// the value pointed to by @fullscreen is set to true if it should go
75// fullscreen, or false, if it should go unfullscreen.
76func (x *ToplevelLayout) GetFullscreen(FullscreenVar *bool) bool {
77
78	cret := xToplevelLayoutGetFullscreen(x.GoPointer(), FullscreenVar)
79	return cret
80}
81
82var xToplevelLayoutGetFullscreenMonitor func(uintptr) uintptr
83
84// Returns the monitor that the layout is fullscreening
85// the surface on.
86func (x *ToplevelLayout) GetFullscreenMonitor() *Monitor {
87	var cls *Monitor
88
89	cret := xToplevelLayoutGetFullscreenMonitor(x.GoPointer())
90
91	if cret == 0 {
92		return nil
93	}
94	gobject.IncreaseRef(cret)
95	cls = &Monitor{}
96	cls.Ptr = cret
97	return cls
98}
99
100var xToplevelLayoutGetMaximized func(uintptr, *bool) bool
101
102// If the layout specifies whether to the toplevel should go maximized,
103// the value pointed to by @maximized is set to true if it should go
104// maximized, or false, if it should go unmaximized.
105func (x *ToplevelLayout) GetMaximized(MaximizedVar *bool) bool {
106
107	cret := xToplevelLayoutGetMaximized(x.GoPointer(), MaximizedVar)
108	return cret
109}
110
111var xToplevelLayoutGetResizable func(uintptr) bool
112
113// Returns whether the layout should allow the user
114// to resize the surface.
115func (x *ToplevelLayout) GetResizable() bool {
116
117	cret := xToplevelLayoutGetResizable(x.GoPointer())
118	return cret
119}
120
121var xToplevelLayoutRef func(uintptr) *ToplevelLayout
122
123// Increases the reference count of @layout.
124func (x *ToplevelLayout) Ref() *ToplevelLayout {
125
126	cret := xToplevelLayoutRef(x.GoPointer())
127	return cret
128}
129
130var xToplevelLayoutSetFullscreen func(uintptr, bool, uintptr)
131
132// Sets whether the layout should cause the surface
133// to be fullscreen when presented.
134func (x *ToplevelLayout) SetFullscreen(FullscreenVar bool, MonitorVar *Monitor) {
135
136	xToplevelLayoutSetFullscreen(x.GoPointer(), FullscreenVar, MonitorVar.GoPointer())
137
138}
139
140var xToplevelLayoutSetMaximized func(uintptr, bool)
141
142// Sets whether the layout should cause the surface
143// to be maximized when presented.
144func (x *ToplevelLayout) SetMaximized(MaximizedVar bool) {
145
146	xToplevelLayoutSetMaximized(x.GoPointer(), MaximizedVar)
147
148}
149
150var xToplevelLayoutSetResizable func(uintptr, bool)
151
152// Sets whether the layout should allow the user
153// to resize the surface after it has been presented.
154func (x *ToplevelLayout) SetResizable(ResizableVar bool) {
155
156	xToplevelLayoutSetResizable(x.GoPointer(), ResizableVar)
157
158}
159
160var xToplevelLayoutUnref func(uintptr)
161
162// Decreases the reference count of @layout.
163func (x *ToplevelLayout) Unref() {
164
165	xToplevelLayoutUnref(x.GoPointer())
166
167}
168
169func init() {
170	core.SetPackageName("GDK", "gtk4")
171	core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1"})
172	var libs []uintptr
173	for _, libPath := range core.GetPaths("GDK") {
174		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
175		if err != nil {
176			panic(err)
177		}
178		libs = append(libs, lib)
179	}
180
181	core.PuregoSafeRegister(&xToplevelLayoutGLibType, libs, "gdk_toplevel_layout_get_type")
182
183	core.PuregoSafeRegister(&xNewToplevelLayout, libs, "gdk_toplevel_layout_new")
184
185	core.PuregoSafeRegister(&xToplevelLayoutCopy, libs, "gdk_toplevel_layout_copy")
186	core.PuregoSafeRegister(&xToplevelLayoutEqual, libs, "gdk_toplevel_layout_equal")
187	core.PuregoSafeRegister(&xToplevelLayoutGetFullscreen, libs, "gdk_toplevel_layout_get_fullscreen")
188	core.PuregoSafeRegister(&xToplevelLayoutGetFullscreenMonitor, libs, "gdk_toplevel_layout_get_fullscreen_monitor")
189	core.PuregoSafeRegister(&xToplevelLayoutGetMaximized, libs, "gdk_toplevel_layout_get_maximized")
190	core.PuregoSafeRegister(&xToplevelLayoutGetResizable, libs, "gdk_toplevel_layout_get_resizable")
191	core.PuregoSafeRegister(&xToplevelLayoutRef, libs, "gdk_toplevel_layout_ref")
192	core.PuregoSafeRegister(&xToplevelLayoutSetFullscreen, libs, "gdk_toplevel_layout_set_fullscreen")
193	core.PuregoSafeRegister(&xToplevelLayoutSetMaximized, libs, "gdk_toplevel_layout_set_maximized")
194	core.PuregoSafeRegister(&xToplevelLayoutSetResizable, libs, "gdk_toplevel_layout_set_resizable")
195	core.PuregoSafeRegister(&xToplevelLayoutUnref, libs, "gdk_toplevel_layout_unref")
196
197}

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