v0.2.1 c0399be

gtkimmulticontext.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/types"
12)
13
14type IMMulticontextClass struct {
15	_ structs.HostLayout
16
17	ParentClass IMContextClass
18
19	xGtkReserved1 uintptr
20
21	xGtkReserved2 uintptr
22
23	xGtkReserved3 uintptr
24
25	xGtkReserved4 uintptr
26}
27
28func (x *IMMulticontextClass) GoPointer() uintptr {
29	return uintptr(unsafe.Pointer(x))
30}
31
32// OverrideGtkReserved1 sets the "_gtk_reserved1" callback function.
33func (x *IMMulticontextClass) OverrideGtkReserved1(cb func()) {
34	if cb == nil {
35		x.xGtkReserved1 = 0
36	} else {
37		x.xGtkReserved1 = purego.NewCallback(func() {
38			cb()
39		})
40	}
41}
42
43// GetGtkReserved1 gets the "_gtk_reserved1" callback function.
44func (x *IMMulticontextClass) GetGtkReserved1() func() {
45	if x.xGtkReserved1 == 0 {
46		return nil
47	}
48	var rawCallback func()
49	purego.RegisterFunc(&rawCallback, x.xGtkReserved1)
50	return func() {
51		rawCallback()
52	}
53}
54
55// OverrideGtkReserved2 sets the "_gtk_reserved2" callback function.
56func (x *IMMulticontextClass) OverrideGtkReserved2(cb func()) {
57	if cb == nil {
58		x.xGtkReserved2 = 0
59	} else {
60		x.xGtkReserved2 = purego.NewCallback(func() {
61			cb()
62		})
63	}
64}
65
66// GetGtkReserved2 gets the "_gtk_reserved2" callback function.
67func (x *IMMulticontextClass) GetGtkReserved2() func() {
68	if x.xGtkReserved2 == 0 {
69		return nil
70	}
71	var rawCallback func()
72	purego.RegisterFunc(&rawCallback, x.xGtkReserved2)
73	return func() {
74		rawCallback()
75	}
76}
77
78// OverrideGtkReserved3 sets the "_gtk_reserved3" callback function.
79func (x *IMMulticontextClass) OverrideGtkReserved3(cb func()) {
80	if cb == nil {
81		x.xGtkReserved3 = 0
82	} else {
83		x.xGtkReserved3 = purego.NewCallback(func() {
84			cb()
85		})
86	}
87}
88
89// GetGtkReserved3 gets the "_gtk_reserved3" callback function.
90func (x *IMMulticontextClass) GetGtkReserved3() func() {
91	if x.xGtkReserved3 == 0 {
92		return nil
93	}
94	var rawCallback func()
95	purego.RegisterFunc(&rawCallback, x.xGtkReserved3)
96	return func() {
97		rawCallback()
98	}
99}
100
101// OverrideGtkReserved4 sets the "_gtk_reserved4" callback function.
102func (x *IMMulticontextClass) OverrideGtkReserved4(cb func()) {
103	if cb == nil {
104		x.xGtkReserved4 = 0
105	} else {
106		x.xGtkReserved4 = purego.NewCallback(func() {
107			cb()
108		})
109	}
110}
111
112// GetGtkReserved4 gets the "_gtk_reserved4" callback function.
113func (x *IMMulticontextClass) GetGtkReserved4() func() {
114	if x.xGtkReserved4 == 0 {
115		return nil
116	}
117	var rawCallback func()
118	purego.RegisterFunc(&rawCallback, x.xGtkReserved4)
119	return func() {
120		rawCallback()
121	}
122}
123
124type IMMulticontextPrivate struct {
125	_ structs.HostLayout
126}
127
128func (x *IMMulticontextPrivate) GoPointer() uintptr {
129	return uintptr(unsafe.Pointer(x))
130}
131
132// Supports switching between multiple input methods.
133//
134// Text widgets such as `GtkText` or `GtkTextView` use a `GtkIMMultiContext`
135// to implement their `im-module` property for switching between different
136// input methods.
137type IMMulticontext struct {
138	IMContext
139}
140
141var xIMMulticontextGLibType func() types.GType
142
143func IMMulticontextGLibType() types.GType {
144	return xIMMulticontextGLibType()
145}
146
147func IMMulticontextNewFromInternalPtr(ptr uintptr) *IMMulticontext {
148	cls := &IMMulticontext{}
149	cls.Ptr = ptr
150	return cls
151}
152
153var xNewIMMulticontext func() uintptr
154
155// Creates a new `GtkIMMulticontext`.
156func NewIMMulticontext() *IMMulticontext {
157	var cls *IMMulticontext
158
159	cret := xNewIMMulticontext()
160
161	if cret == 0 {
162		return nil
163	}
164	cls = &IMMulticontext{}
165	cls.Ptr = cret
166	return cls
167}
168
169var xIMMulticontextGetContextId func(uintptr) string
170
171// Gets the id of the currently active delegate of the @context.
172func (x *IMMulticontext) GetContextId() string {
173
174	cret := xIMMulticontextGetContextId(x.GoPointer())
175	return cret
176}
177
178var xIMMulticontextSetContextId func(uintptr, uintptr)
179
180// Sets the context id for @context.
181//
182// This causes the currently active delegate of @context to be
183// replaced by the delegate corresponding to the new context id.
184//
185// Setting this to a non-%NULL value overrides the system-wide
186// IM module setting. See the [property@Gtk.Settings:gtk-im-module]
187// property.
188func (x *IMMulticontext) SetContextId(ContextIdVar *string) {
189
190	ContextIdVarPtr := core.GStrdupNullable(ContextIdVar)
191	defer core.GFreeNullable(ContextIdVarPtr)
192
193	xIMMulticontextSetContextId(x.GoPointer(), ContextIdVarPtr)
194
195}
196
197func (c *IMMulticontext) GoPointer() uintptr {
198	if c == nil {
199		return 0
200	}
201	return c.Ptr
202}
203
204func (c *IMMulticontext) SetGoPointer(ptr uintptr) {
205	c.Ptr = ptr
206}
207
208func init() {
209	core.SetPackageName("GTK", "gtk4")
210	core.SetSharedLibraries("GTK", []string{"libgtk-4.so.1"})
211	var libs []uintptr
212	for _, libPath := range core.GetPaths("GTK") {
213		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
214		if err != nil {
215			panic(err)
216		}
217		libs = append(libs, lib)
218	}
219
220	core.PuregoSafeRegister(&xIMMulticontextGLibType, libs, "gtk_im_multicontext_get_type")
221
222	core.PuregoSafeRegister(&xNewIMMulticontext, libs, "gtk_im_multicontext_new")
223
224	core.PuregoSafeRegister(&xIMMulticontextGetContextId, libs, "gtk_im_multicontext_get_context_id")
225	core.PuregoSafeRegister(&xIMMulticontextSetContextId, libs, "gtk_im_multicontext_set_context_id")
226
227}

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