v0.2.1 c0399be

gtkcellrendererpixbuf.go RawHistoryFolder

1// Package gtk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gtk
3
4import (
5	"github.com/ebitengine/purego"
6
7	"github.com/bnema/puregotk/pkg/core"
8	"github.com/bnema/puregotk/v4/gobject"
9	"github.com/bnema/puregotk/v4/gobject/types"
10)
11
12// Renders a pixbuf in a cell
13//
14// A `GtkCellRendererPixbuf` can be used to render an image in a cell. It allows
15// to render either a given `GdkPixbuf` (set via the
16// `GtkCellRendererPixbuf:pixbuf` property) or a named icon (set via the
17// `GtkCellRendererPixbuf:icon-name` property).
18//
19// To support the tree view, `GtkCellRendererPixbuf` also supports rendering two
20// alternative pixbufs, when the `GtkCellRenderer:is-expander` property is %TRUE.
21// If the `GtkCellRenderer:is-expanded property` is %TRUE and the
22// `GtkCellRendererPixbuf:pixbuf-expander-open` property is set to a pixbuf, it
23// renders that pixbuf, if the `GtkCellRenderer:is-expanded` property is %FALSE
24// and the `GtkCellRendererPixbuf:pixbuf-expander-closed` property is set to a
25// pixbuf, it renders that one.
26type CellRendererPixbuf struct {
27	CellRenderer
28}
29
30var xCellRendererPixbufGLibType func() types.GType
31
32func CellRendererPixbufGLibType() types.GType {
33	return xCellRendererPixbufGLibType()
34}
35
36func CellRendererPixbufNewFromInternalPtr(ptr uintptr) *CellRendererPixbuf {
37	cls := &CellRendererPixbuf{}
38	cls.Ptr = ptr
39	return cls
40}
41
42var xNewCellRendererPixbuf func() uintptr
43
44// Creates a new `GtkCellRendererPixbuf`. Adjust rendering
45// parameters using object properties. Object properties can be set
46// globally (with g_object_set()). Also, with `GtkTreeViewColumn`, you
47// can bind a property to a value in a `GtkTreeModel`. For example, you
48// can bind the “pixbuf” property on the cell renderer to a pixbuf value
49// in the model, thus rendering a different image in each row of the
50// `GtkTreeView`.
51func NewCellRendererPixbuf() *CellRendererPixbuf {
52	var cls *CellRendererPixbuf
53
54	cret := xNewCellRendererPixbuf()
55
56	if cret == 0 {
57		return nil
58	}
59	gobject.IncreaseRef(cret)
60	cls = &CellRendererPixbuf{}
61	cls.Ptr = cret
62	return cls
63}
64
65func (c *CellRendererPixbuf) GoPointer() uintptr {
66	if c == nil {
67		return 0
68	}
69	return c.Ptr
70}
71
72func (c *CellRendererPixbuf) SetGoPointer(ptr uintptr) {
73	c.Ptr = ptr
74}
75
76// SetPropertyIconName sets the "icon-name" property.
77// The name of the themed icon to display.
78// This property only has an effect if not overridden by the "pixbuf" property.
79func (x *CellRendererPixbuf) SetPropertyIconName(value string) {
80	var v gobject.Value
81	v.Init(gobject.TypeStringVal)
82	v.SetString(&value)
83	x.SetProperty("icon-name", &v)
84}
85
86// GetPropertyIconName gets the "icon-name" property.
87// The name of the themed icon to display.
88// This property only has an effect if not overridden by the "pixbuf" property.
89func (x *CellRendererPixbuf) GetPropertyIconName() string {
90	var v gobject.Value
91	x.GetProperty("icon-name", &v)
92	return v.GetString()
93}
94
95func init() {
96	core.SetPackageName("GTK", "gtk4")
97	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
98	var libs []uintptr
99	for _, libPath := range core.GetPaths("GTK") {
100		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
101		if err != nil {
102			panic(err)
103		}
104		libs = append(libs, lib)
105	}
106
107	core.PuregoSafeRegister(&xCellRendererPixbufGLibType, libs, "gtk_cell_renderer_pixbuf_get_type")
108
109	core.PuregoSafeRegister(&xNewCellRendererPixbuf, libs, "gtk_cell_renderer_pixbuf_new")
110
111}

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