v0.2.1 c0399be

gtktreelistrowsorter.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
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
15type TreeListRowSorterClass struct {
16	_ structs.HostLayout
17
18	ParentClass SorterClass
19}
20
21func (x *TreeListRowSorterClass) GoPointer() uintptr {
22	return uintptr(unsafe.Pointer(x))
23}
24
25// Applies a gives sorter to the levels in a tree.
26//
27// Here is an example for setting up a column view with a tree model and
28// a `GtkTreeListSorter`:
29//
30// ```c
31// column_sorter = gtk_column_view_get_sorter (view);
32// sorter = gtk_tree_list_row_sorter_new (g_object_ref (column_sorter));
33// sort_model = gtk_sort_list_model_new (tree_model, sorter);
34// selection = gtk_single_selection_new (sort_model);
35// gtk_column_view_set_model (view, G_LIST_MODEL (selection));
36// ```
37type TreeListRowSorter struct {
38	Sorter
39}
40
41var xTreeListRowSorterGLibType func() types.GType
42
43func TreeListRowSorterGLibType() types.GType {
44	return xTreeListRowSorterGLibType()
45}
46
47func TreeListRowSorterNewFromInternalPtr(ptr uintptr) *TreeListRowSorter {
48	cls := &TreeListRowSorter{}
49	cls.Ptr = ptr
50	return cls
51}
52
53var xNewTreeListRowSorter func(uintptr) uintptr
54
55// Create a special-purpose sorter that applies the sorting
56// of @sorter to the levels of a `GtkTreeListModel`.
57//
58// Note that this sorter relies on [property@Gtk.TreeListModel:passthrough]
59// being %FALSE as it can only sort [class@Gtk.TreeListRow]s.
60func NewTreeListRowSorter(SorterVar *Sorter) *TreeListRowSorter {
61	var cls *TreeListRowSorter
62
63	cret := xNewTreeListRowSorter(SorterVar.GoPointer())
64
65	if cret == 0 {
66		return nil
67	}
68	cls = &TreeListRowSorter{}
69	cls.Ptr = cret
70	return cls
71}
72
73var xTreeListRowSorterGetSorter func(uintptr) uintptr
74
75// Returns the sorter used by @self.
76func (x *TreeListRowSorter) GetSorter() *Sorter {
77	var cls *Sorter
78
79	cret := xTreeListRowSorterGetSorter(x.GoPointer())
80
81	if cret == 0 {
82		return nil
83	}
84	gobject.IncreaseRef(cret)
85	cls = &Sorter{}
86	cls.Ptr = cret
87	return cls
88}
89
90var xTreeListRowSorterSetSorter func(uintptr, uintptr)
91
92// Sets the sorter to use for items with the same parent.
93//
94// This sorter will be passed the [property@Gtk.TreeListRow:item] of
95// the tree list rows passed to @self.
96func (x *TreeListRowSorter) SetSorter(SorterVar *Sorter) {
97
98	xTreeListRowSorterSetSorter(x.GoPointer(), SorterVar.GoPointer())
99
100}
101
102func (c *TreeListRowSorter) GoPointer() uintptr {
103	if c == nil {
104		return 0
105	}
106	return c.Ptr
107}
108
109func (c *TreeListRowSorter) SetGoPointer(ptr uintptr) {
110	c.Ptr = ptr
111}
112
113func init() {
114	core.SetPackageName("GTK", "gtk4")
115	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
116	var libs []uintptr
117	for _, libPath := range core.GetPaths("GTK") {
118		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
119		if err != nil {
120			panic(err)
121		}
122		libs = append(libs, lib)
123	}
124
125	core.PuregoSafeRegister(&xTreeListRowSorterGLibType, libs, "gtk_tree_list_row_sorter_get_type")
126
127	core.PuregoSafeRegister(&xNewTreeListRowSorter, libs, "gtk_tree_list_row_sorter_new")
128
129	core.PuregoSafeRegister(&xTreeListRowSorterGetSorter, libs, "gtk_tree_list_row_sorter_get_sorter")
130	core.PuregoSafeRegister(&xTreeListRowSorterSetSorter, libs, "gtk_tree_list_row_sorter_set_sorter")
131
132}

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