v0.2.1 c0399be

gdktoplevelsize.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/types"
12)
13
14// Contains information that is useful to compute the size of a toplevel.
15type ToplevelSize struct {
16	_ structs.HostLayout
17}
18
19var xToplevelSizeGLibType func() types.GType
20
21func ToplevelSizeGLibType() types.GType {
22	return xToplevelSizeGLibType()
23}
24
25func (x *ToplevelSize) GoPointer() uintptr {
26	return uintptr(unsafe.Pointer(x))
27}
28
29var xToplevelSizeGetBounds func(uintptr, *int, *int)
30
31// Retrieves the bounds the toplevel is placed within.
32//
33// The bounds represent the largest size a toplevel may have while still being
34// able to fit within some type of boundary. Depending on the backend, this may
35// be equivalent to the dimensions of the work area or the monitor on which the
36// window is being presented on, or something else that limits the way a
37// toplevel can be presented.
38func (x *ToplevelSize) GetBounds(BoundsWidthVar *int, BoundsHeightVar *int) {
39
40	xToplevelSizeGetBounds(x.GoPointer(), BoundsWidthVar, BoundsHeightVar)
41
42}
43
44var xToplevelSizeSetMinSize func(uintptr, int, int)
45
46// Sets the minimum size of the toplevel.
47//
48// The minimum size corresponds to the limitations the toplevel can be shrunk
49// to, without resulting in incorrect painting. A user of a `GdkToplevel` should
50// calculate these given both the existing size, and the bounds retrieved from
51// the `GdkToplevelSize` object.
52//
53// The minimum size should be within the bounds (see
54// [method@Gdk.ToplevelSize.get_bounds]).
55func (x *ToplevelSize) SetMinSize(MinWidthVar int, MinHeightVar int) {
56
57	xToplevelSizeSetMinSize(x.GoPointer(), MinWidthVar, MinHeightVar)
58
59}
60
61var xToplevelSizeSetShadowWidth func(uintptr, int, int, int, int)
62
63// Sets the shadows size of the toplevel.
64//
65// The shadow width corresponds to the part of the computed surface size
66// that would consist of the shadow margin surrounding the window, would
67// there be any.
68//
69// Shadow width should only be set if
70// [method@Gtk.Display.supports_shadow_width] is %TRUE.
71func (x *ToplevelSize) SetShadowWidth(LeftVar int, RightVar int, TopVar int, BottomVar int) {
72
73	xToplevelSizeSetShadowWidth(x.GoPointer(), LeftVar, RightVar, TopVar, BottomVar)
74
75}
76
77var xToplevelSizeSetSize func(uintptr, int, int)
78
79// Sets the size the toplevel prefers to be resized to.
80//
81// The size should be within the bounds (see
82// [method@Gdk.ToplevelSize.get_bounds]). The set size should
83// be considered as a hint, and should not be assumed to be
84// respected by the windowing system, or backend.
85func (x *ToplevelSize) SetSize(WidthVar int, HeightVar int) {
86
87	xToplevelSizeSetSize(x.GoPointer(), WidthVar, HeightVar)
88
89}
90
91func init() {
92	core.SetPackageName("GDK", "gtk4")
93	core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1"})
94	var libs []uintptr
95	for _, libPath := range core.GetPaths("GDK") {
96		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
97		if err != nil {
98			panic(err)
99		}
100		libs = append(libs, lib)
101	}
102
103	core.PuregoSafeRegister(&xToplevelSizeGLibType, libs, "gdk_toplevel_size_get_type")
104
105	core.PuregoSafeRegister(&xToplevelSizeGetBounds, libs, "gdk_toplevel_size_get_bounds")
106	core.PuregoSafeRegister(&xToplevelSizeSetMinSize, libs, "gdk_toplevel_size_set_min_size")
107	core.PuregoSafeRegister(&xToplevelSizeSetShadowWidth, libs, "gdk_toplevel_size_set_shadow_width")
108	core.PuregoSafeRegister(&xToplevelSizeSetSize, libs, "gdk_toplevel_size_set_size")
109
110}

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