v0.2.1 c0399be

gtkcolumnviewcell.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 ColumnViewCellClass struct {
16	_ structs.HostLayout
17}
18
19func (x *ColumnViewCellClass) GoPointer() uintptr {
20	return uintptr(unsafe.Pointer(x))
21}
22
23// Represents items in a cell in [class@Gtk.ColumnView].
24//
25// The `GtkColumnViewCell`s are managed by the [class@Gtk.ColumnView]
26// widget (with its factory) and cannot be created by applications, but
27// they need to be populated by application code. This is done by calling
28// [method@Gtk.ColumnViewCell.set_child].
29//
30// `GtkColumnViewCell`s exist in 2 stages:
31//
32//  1. The unbound stage where the listitem is not currently connected to
33//     an item in the list. In that case, the [property@Gtk.ColumnViewCell:item]
34//     property is set to %NULL.
35//
36//  2. The bound stage where the listitem references an item from the list.
37//     The [property@Gtk.ColumnViewCell:item] property is not %NULL.
38type ColumnViewCell struct {
39	ListItem
40}
41
42var xColumnViewCellGLibType func() types.GType
43
44func ColumnViewCellGLibType() types.GType {
45	return xColumnViewCellGLibType()
46}
47
48func ColumnViewCellNewFromInternalPtr(ptr uintptr) *ColumnViewCell {
49	cls := &ColumnViewCell{}
50	cls.Ptr = ptr
51	return cls
52}
53
54var xColumnViewCellGetChild func(uintptr) uintptr
55
56// Gets the child previously set via gtk_column_view_cell_set_child() or
57// %NULL if none was set.
58func (x *ColumnViewCell) GetChild() *Widget {
59	var cls *Widget
60
61	cret := xColumnViewCellGetChild(x.GoPointer())
62
63	if cret == 0 {
64		return nil
65	}
66	gobject.IncreaseRef(cret)
67	cls = &Widget{}
68	cls.Ptr = cret
69	return cls
70}
71
72var xColumnViewCellGetFocusable func(uintptr) bool
73
74// Checks if a list item has been set to be focusable via
75// gtk_column_view_cell_set_focusable().
76func (x *ColumnViewCell) GetFocusable() bool {
77
78	cret := xColumnViewCellGetFocusable(x.GoPointer())
79	return cret
80}
81
82var xColumnViewCellGetItem func(uintptr) uintptr
83
84// Gets the model item that associated with @self.
85//
86// If @self is unbound, this function returns %NULL.
87func (x *ColumnViewCell) GetItem() *gobject.Object {
88	var cls *gobject.Object
89
90	cret := xColumnViewCellGetItem(x.GoPointer())
91
92	if cret == 0 {
93		return nil
94	}
95	gobject.IncreaseRef(cret)
96	cls = &gobject.Object{}
97	cls.Ptr = cret
98	return cls
99}
100
101var xColumnViewCellGetPosition func(uintptr) uint
102
103// Gets the position in the model that @self currently displays.
104//
105// If @self is unbound, %GTK_INVALID_LIST_POSITION is returned.
106func (x *ColumnViewCell) GetPosition() uint {
107
108	cret := xColumnViewCellGetPosition(x.GoPointer())
109	return cret
110}
111
112var xColumnViewCellGetSelected func(uintptr) bool
113
114// Checks if the item is displayed as selected.
115//
116// The selected state is maintained by the list widget and its model
117// and cannot be set otherwise.
118func (x *ColumnViewCell) GetSelected() bool {
119
120	cret := xColumnViewCellGetSelected(x.GoPointer())
121	return cret
122}
123
124var xColumnViewCellSetChild func(uintptr, uintptr)
125
126// Sets the child to be used for this listitem.
127//
128// This function is typically called by applications when
129// setting up a listitem so that the widget can be reused when
130// binding it multiple times.
131func (x *ColumnViewCell) SetChild(ChildVar *Widget) {
132
133	xColumnViewCellSetChild(x.GoPointer(), ChildVar.GoPointer())
134
135}
136
137var xColumnViewCellSetFocusable func(uintptr, bool)
138
139// Sets @self to be focusable.
140//
141// If an item is focusable, it can be focused using the keyboard.
142// This works similar to [method@Gtk.Widget.set_focusable].
143//
144// Note that if items are not focusable, the keyboard cannot be used to activate
145// them and selecting only works if one of the listitem's children is focusable.
146//
147// By default, list items are focusable.
148func (x *ColumnViewCell) SetFocusable(FocusableVar bool) {
149
150	xColumnViewCellSetFocusable(x.GoPointer(), FocusableVar)
151
152}
153
154func (c *ColumnViewCell) GoPointer() uintptr {
155	if c == nil {
156		return 0
157	}
158	return c.Ptr
159}
160
161func (c *ColumnViewCell) SetGoPointer(ptr uintptr) {
162	c.Ptr = ptr
163}
164
165// SetPropertyFocusable sets the "focusable" property.
166// If the item can be focused with the keyboard.
167func (x *ColumnViewCell) SetPropertyFocusable(value bool) {
168	var v gobject.Value
169	v.Init(gobject.TypeBooleanVal)
170	v.SetBoolean(value)
171	x.SetProperty("focusable", &v)
172}
173
174// GetPropertyFocusable gets the "focusable" property.
175// If the item can be focused with the keyboard.
176func (x *ColumnViewCell) GetPropertyFocusable() bool {
177	var v gobject.Value
178	x.GetProperty("focusable", &v)
179	return v.GetBoolean()
180}
181
182// GetPropertyPosition gets the "position" property.
183// Position of the item.
184func (x *ColumnViewCell) GetPropertyPosition() uint {
185	var v gobject.Value
186	x.GetProperty("position", &v)
187	return v.GetUint()
188}
189
190// GetPropertySelected gets the "selected" property.
191// If the item is currently selected.
192func (x *ColumnViewCell) GetPropertySelected() bool {
193	var v gobject.Value
194	x.GetProperty("selected", &v)
195	return v.GetBoolean()
196}
197
198func init() {
199	core.SetPackageName("GTK", "gtk4")
200	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
201	var libs []uintptr
202	for _, libPath := range core.GetPaths("GTK") {
203		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
204		if err != nil {
205			panic(err)
206		}
207		libs = append(libs, lib)
208	}
209
210	core.PuregoSafeRegister(&xColumnViewCellGLibType, libs, "gtk_column_view_cell_get_type")
211
212	core.PuregoSafeRegister(&xColumnViewCellGetChild, libs, "gtk_column_view_cell_get_child")
213	core.PuregoSafeRegister(&xColumnViewCellGetFocusable, libs, "gtk_column_view_cell_get_focusable")
214	core.PuregoSafeRegister(&xColumnViewCellGetItem, libs, "gtk_column_view_cell_get_item")
215	core.PuregoSafeRegister(&xColumnViewCellGetPosition, libs, "gtk_column_view_cell_get_position")
216	core.PuregoSafeRegister(&xColumnViewCellGetSelected, libs, "gtk_column_view_cell_get_selected")
217	core.PuregoSafeRegister(&xColumnViewCellSetChild, libs, "gtk_column_view_cell_set_child")
218	core.PuregoSafeRegister(&xColumnViewCellSetFocusable, libs, "gtk_column_view_cell_set_focusable")
219
220}

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