v0.2.2 9100209

gdkpixbuf.go RawHistoryFolder

1// Package gdk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gdk
3
4import (
5	"github.com/ebitengine/purego"
6
7	"github.com/bnema/puregotk/pkg/core"
8	"github.com/bnema/puregotk/v4/cairo"
9	"github.com/bnema/puregotk/v4/gdkpixbuf"
10)
11
12var xPixbufGetFromSurface func(*cairo.Surface, int, int, int, int) uintptr
13
14// Transfers image data from a `cairo_surface_t` and converts it
15// to a `GdkPixbuf`.
16//
17// This allows you to efficiently read individual pixels from cairo surfaces.
18//
19// This function will create an RGB pixbuf with 8 bits per channel.
20// The pixbuf will contain an alpha channel if the @surface contains one.
21func PixbufGetFromSurface(SurfaceVar *cairo.Surface, SrcXVar int, SrcYVar int, WidthVar int, HeightVar int) *gdkpixbuf.Pixbuf {
22	var cls *gdkpixbuf.Pixbuf
23
24	cret := xPixbufGetFromSurface(SurfaceVar, SrcXVar, SrcYVar, WidthVar, HeightVar)
25
26	if cret == 0 {
27		return nil
28	}
29	cls = &gdkpixbuf.Pixbuf{}
30	cls.Ptr = cret
31	return cls
32}
33
34var xPixbufGetFromTexture func(uintptr) uintptr
35
36// Creates a new pixbuf from @texture.
37//
38// This should generally not be used in newly written code as later
39// stages will almost certainly convert the pixbuf back into a texture
40// to draw it on screen.
41func PixbufGetFromTexture(TextureVar *Texture) *gdkpixbuf.Pixbuf {
42	var cls *gdkpixbuf.Pixbuf
43
44	cret := xPixbufGetFromTexture(TextureVar.GoPointer())
45
46	if cret == 0 {
47		return nil
48	}
49	cls = &gdkpixbuf.Pixbuf{}
50	cls.Ptr = cret
51	return cls
52}
53
54func init() {
55	core.SetPackageName("GDK", "gtk4")
56	core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1"})
57	var libs []uintptr
58	for _, libPath := range core.GetPaths("GDK") {
59		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
60		if err != nil {
61			panic(err)
62		}
63		libs = append(libs, lib)
64	}
65
66	core.PuregoSafeRegister(&xPixbufGetFromSurface, libs, "gdk_pixbuf_get_from_surface")
67	core.PuregoSafeRegister(&xPixbufGetFromTexture, libs, "gdk_pixbuf_get_from_texture")
68
69}

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