v0.3.0 96f3aeb

text-input-unstable-v3_generated.go RawHistoryFolder

1// Code generated by wlturbo-scanner. DO NOT EDIT.
2// Protocol: text_input_unstable_v3
3// Source: text-input-unstable-v3.xml
4
5package textinput
6
7import (
8	"sync"
9
10	cross_wl_seat "github.com/bnema/wlturbo/protocol/core"
11	"github.com/bnema/wlturbo/wl"
12)
13
14// CHANGE_CAUSE_INPUT_METHOD is the change_cause input_method value.
15const CHANGE_CAUSE_INPUT_METHOD = 0
16
17// CHANGE_CAUSE_OTHER is the change_cause other value.
18const CHANGE_CAUSE_OTHER = 1
19
20// CONTENT_HINT_NONE is the content_hint none value.
21const CONTENT_HINT_NONE = 0x0
22
23// CONTENT_HINT_COMPLETION is the content_hint completion value.
24const CONTENT_HINT_COMPLETION = 0x1
25
26// CONTENT_HINT_SPELLCHECK is the content_hint spellcheck value.
27const CONTENT_HINT_SPELLCHECK = 0x2
28
29// CONTENT_HINT_AUTO_CAPITALIZATION is the content_hint auto_capitalization value.
30const CONTENT_HINT_AUTO_CAPITALIZATION = 0x4
31
32// CONTENT_HINT_LOWERCASE is the content_hint lowercase value.
33const CONTENT_HINT_LOWERCASE = 0x8
34
35// CONTENT_HINT_UPPERCASE is the content_hint uppercase value.
36const CONTENT_HINT_UPPERCASE = 0x10
37
38// CONTENT_HINT_TITLECASE is the content_hint titlecase value.
39const CONTENT_HINT_TITLECASE = 0x20
40
41// CONTENT_HINT_HIDDEN_TEXT is the content_hint hidden_text value.
42const CONTENT_HINT_HIDDEN_TEXT = 0x40
43
44// CONTENT_HINT_SENSITIVE_DATA is the content_hint sensitive_data value.
45const CONTENT_HINT_SENSITIVE_DATA = 0x80
46
47// CONTENT_HINT_LATIN is the content_hint latin value.
48const CONTENT_HINT_LATIN = 0x100
49
50// CONTENT_HINT_MULTILINE is the content_hint multiline value.
51const CONTENT_HINT_MULTILINE = 0x200
52
53// CONTENT_HINT_ON_SCREEN_INPUT_PROVIDED is the content_hint on_screen_input_provided value.
54const CONTENT_HINT_ON_SCREEN_INPUT_PROVIDED = 0x400
55
56// CONTENT_HINT_NO_EMOJI is the content_hint no_emoji value.
57const CONTENT_HINT_NO_EMOJI = 0x800
58
59// CONTENT_HINT_PREEDIT_SHOWN is the content_hint preedit_shown value.
60const CONTENT_HINT_PREEDIT_SHOWN = 0x1000
61
62// CONTENT_PURPOSE_NORMAL is the content_purpose normal value.
63const CONTENT_PURPOSE_NORMAL = 0
64
65// CONTENT_PURPOSE_ALPHA is the content_purpose alpha value.
66const CONTENT_PURPOSE_ALPHA = 1
67
68// CONTENT_PURPOSE_DIGITS is the content_purpose digits value.
69const CONTENT_PURPOSE_DIGITS = 2
70
71// CONTENT_PURPOSE_NUMBER is the content_purpose number value.
72const CONTENT_PURPOSE_NUMBER = 3
73
74// CONTENT_PURPOSE_PHONE is the content_purpose phone value.
75const CONTENT_PURPOSE_PHONE = 4
76
77// CONTENT_PURPOSE_URL is the content_purpose url value.
78const CONTENT_PURPOSE_URL = 5
79
80// CONTENT_PURPOSE_EMAIL is the content_purpose email value.
81const CONTENT_PURPOSE_EMAIL = 6
82
83// CONTENT_PURPOSE_NAME is the content_purpose name value.
84const CONTENT_PURPOSE_NAME = 7
85
86// CONTENT_PURPOSE_PASSWORD is the content_purpose password value.
87const CONTENT_PURPOSE_PASSWORD = 8
88
89// CONTENT_PURPOSE_PIN is the content_purpose pin value.
90const CONTENT_PURPOSE_PIN = 9
91
92// CONTENT_PURPOSE_DATE is the content_purpose date value.
93const CONTENT_PURPOSE_DATE = 10
94
95// CONTENT_PURPOSE_TIME is the content_purpose time value.
96const CONTENT_PURPOSE_TIME = 11
97
98// CONTENT_PURPOSE_DATETIME is the content_purpose datetime value.
99const CONTENT_PURPOSE_DATETIME = 12
100
101// CONTENT_PURPOSE_TERMINAL is the content_purpose terminal value.
102const CONTENT_PURPOSE_TERMINAL = 13
103
104// ERROR_INVALID_ACTION is the error invalid_action value.
105const ERROR_INVALID_ACTION = 0
106
107// ACTION_NONE is the action none value.
108const ACTION_NONE = 0
109
110// ACTION_SUBMIT is the action submit value.
111const ACTION_SUBMIT = 1
112
113// PREEDIT_HINT_WHOLE is the preedit_hint whole value.
114const PREEDIT_HINT_WHOLE = 1
115
116// PREEDIT_HINT_SELECTION is the preedit_hint selection value.
117const PREEDIT_HINT_SELECTION = 2
118
119// PREEDIT_HINT_PREDICTION is the preedit_hint prediction value.
120const PREEDIT_HINT_PREDICTION = 3
121
122// PREEDIT_HINT_PREFIX is the preedit_hint prefix value.
123const PREEDIT_HINT_PREFIX = 4
124
125// PREEDIT_HINT_SUFFIX is the preedit_hint suffix value.
126const PREEDIT_HINT_SUFFIX = 5
127
128// PREEDIT_HINT_SPELLING_ERROR is the preedit_hint spelling_error value.
129const PREEDIT_HINT_SPELLING_ERROR = 6
130
131// PREEDIT_HINT_COMPOSE_ERROR is the preedit_hint compose_error value.
132const PREEDIT_HINT_COMPOSE_ERROR = 7
133
134// TextInputV3Interface is the protocol interface name.
135const TextInputV3Interface = "zwp_text_input_v3"
136
137// TextInputV3 is the generated binding for zwp_text_input_v3 version 2.
138type TextInputV3 struct {
139	wl.BaseProxy
140	// handlersMu guards the handler slices: a client may register or replace
141	// handlers while another goroutine dispatches events.
142	handlersMu              sync.Mutex
143	onEnter                 []func(surfaceID uint32)
144	onLeave                 []func(surfaceID uint32)
145	onPreeditString         []func(text string, cursorBegin int32, cursorEnd int32)
146	onCommitString          []func(text string)
147	onDeleteSurroundingText []func(beforeLength uint32, afterLength uint32)
148	onDone                  []func(serial uint32)
149	onAction                []func(action uint32, serial uint32)
150	onLanguage              []func(language string)
151	onPreeditHint           []func(start uint32, end uint32, hint uint32)
152}
153
154// NewTextInputV3 returns an unbound TextInputV3.
155func NewTextInputV3(ctx *wl.Context) *TextInputV3 {
156	obj := &TextInputV3{}
157	obj.SetContext(ctx)
158	ctx.Register(obj)
159	return obj
160}
161
162// Destroy the wp_text_input object. Also disables all surfaces enabled through this wp_text_input object.
163func (o *TextInputV3) Destroy() error {
164	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 0, Name: "zwp_text_input_v3.destroy", Destructor: true}); err != nil {
165		return err
166	}
167	return nil
168}
169
170// Requests text input on the surface previously obtained from the enter event. This request must be issued every time the focused text input changes to a new one, including within the current surface. Use zwp_text_input_v3.disable when there is no longer any input focus on the current surface. Clients must not enable more than one text input on the single seat and should disable the current text input before enabling the new one. Requests to enable a text input when another text input is enabled on the same seat must be ignored by compositor. This request resets all state associated with previous enable, disable, set_surrounding_text, set_text_change_cause, set_content_type, and set_cursor_rectangle requests, as well as the state associated with preedit_string, commit_string, and delete_surrounding_text events. The set_surrounding_text, set_content_type and set_cursor_rectangle requests must follow if the text input supports the necessary functionality. State set with this request is double-buffered. It will get applied on the next zwp_text_input_v3.commit request, and stay valid until the next committed enable or disable request. The changes must be applied by the compositor after issuing a zwp_text_input_v3.commit request.
171func (o *TextInputV3) Enable() error {
172	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 1, Name: "zwp_text_input_v3.enable"}); err != nil {
173		return err
174	}
175	return nil
176}
177
178// Explicitly disable text input on the current surface (typically when there is no focus on any text entry inside the surface). State set with this request is double-buffered. It will get applied on the next zwp_text_input_v3.commit request.
179func (o *TextInputV3) Disable() error {
180	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 2, Name: "zwp_text_input_v3.disable"}); err != nil {
181		return err
182	}
183	return nil
184}
185
186// Sets the surrounding plain text around the input, excluding the preedit text. The client should notify the compositor of any changes in any of the values carried with this request, including changes caused by handling incoming text-input events as well as changes caused by other mechanisms like keyboard typing. If the client is unaware of the text around the cursor, it should not issue this request, to signify lack of support to the compositor. Text is UTF-8 encoded, and should include the cursor position, the complete selection and additional characters before and after them. There is a maximum length of wayland messages, so text can not be longer than 4000 bytes. Cursor is the byte offset of the cursor within text buffer. Anchor is the byte offset of the selection anchor within text buffer. If there is no selected text, anchor is the same as cursor. If any preedit text is present, it is replaced with a cursor for the purpose of this event. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request, and stay valid until the next committed enable or disable request. The initial state for affected fields is empty, meaning that the text input does not support sending surrounding text. If the empty values get applied, subsequent attempts to change them may have no effect.
187func (o *TextInputV3) SetSurroundingText(text string, cursor int32, anchor int32) error {
188	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 3, Name: "zwp_text_input_v3.set_surrounding_text"}, text, cursor, anchor); err != nil {
189		return err
190	}
191	return nil
192}
193
194// Tells the compositor why the text surrounding the cursor changed. Whenever the client detects an external change in text, cursor, or anchor posision, it must issue this request to the compositor. This request is intended to give the input method a chance to update the preedit text in an appropriate way, e.g. by removing it when the user starts typing with a keyboard. cause describes the source of the change. The value set with this request is double-buffered. It must be applied and reset to initial at the next zwp_text_input_v3.commit request. The initial value of cause is input_method.
195func (o *TextInputV3) SetTextChangeCause(cause uint32) error {
196	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 4, Name: "zwp_text_input_v3.set_text_change_cause"}, cause); err != nil {
197		return err
198	}
199	return nil
200}
201
202// Sets the content purpose and content hint. While the purpose is the basic purpose of an input field, the hint flags allow to modify some of the behavior. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request. Subsequent attempts to update them may have no effect. The values remain valid until the next committed enable or disable request. The initial value for hint is none, and the initial value for purpose is normal.
203func (o *TextInputV3) SetContentType(hint uint32, purpose uint32) error {
204	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 5, Name: "zwp_text_input_v3.set_content_type"}, hint, purpose); err != nil {
205		return err
206	}
207	return nil
208}
209
210// Marks an area around the cursor as a x, y, width, height rectangle in surface local coordinates. Allows the compositor to put a window with word suggestions near the cursor, without obstructing the text being input. If the client is unaware of the position of edited text, it should not issue this request, to signify lack of support to the compositor. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request, and stay valid until the next committed enable or disable request. The initial values describing a cursor rectangle are empty. That means the text input does not support describing the cursor area. If the empty values get applied, subsequent attempts to change them may have no effect. As of version 2, the zwp_text_input_v3.commit request does not apply values sent with this request. Instead, it stores them in a separate "committed" area. The committed values, if still valid, get applied on the next wl_surface.commit request on the surface with text-input focus. Both committed and applied values get invalidated on: - the next committed enable or disable request, or - a change of the focused surface of the text-input (leave or enter events). This double stage application allows the compositor to position the input method popup in the same frame as the contents of the text on the surface are updated.
211func (o *TextInputV3) SetCursorRectangle(x int32, y int32, width int32, height int32) error {
212	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 6, Name: "zwp_text_input_v3.set_cursor_rectangle"}, x, y, width, height); err != nil {
213		return err
214	}
215	return nil
216}
217
218// Atomically applies state changes recently sent to the compositor. The commit request establishes and updates the state of the client, and must be issued after any changes to apply them. Text input state (enabled status, content purpose, content hint, surrounding text and change cause, cursor rectangle) is conceptually double-buffered within the context of a text input, i.e. between a committed enable request and the following committed enable or disable request. Protocol requests modify the pending state, as opposed to the current state in use by the input method. A commit request atomically applies all pending state, replacing the current state. After commit, the new pending state is as documented for each related request. Requests are applied in the order of arrival. Neither current nor pending state are modified unless noted otherwise. The compositor must count the number of commit requests coming from each zwp_text_input_v3 object and use the count as the serial in done events.
219func (o *TextInputV3) Commit() error {
220	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 7, Name: "zwp_text_input_v3.commit"}); err != nil {
221		return err
222	}
223	return nil
224}
225
226// Set the actions available for this text input. Values set with this request are double-buffered. They will get applied on the next zwp_text_input_v3.commit request. If the available_actions array contains the none action, or contains the same action multiple times, the compositor must raise the invalid_action protocol error. Initially, no actions are available.
227func (o *TextInputV3) SetAvailableActions(availableActions []byte) error {
228	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 8, Name: "zwp_text_input_v3.set_available_actions", Since: 2}, availableActions); err != nil {
229		return err
230	}
231	return nil
232}
233
234// Requests an input panel to be shown (e.g. a on-screen keyboard). This request only hints the desired interaction pattern from the client side, and its effect may be ignored by compositors given other environmental factors. Repeated calls will be ignored.
235func (o *TextInputV3) ShowInputPanel() error {
236	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 9, Name: "zwp_text_input_v3.show_input_panel", Since: 2}); err != nil {
237		return err
238	}
239	return nil
240}
241
242// Requests an input panel to be hidden. This request only hints the desired interaction pattern from the client side, and its effect may be ignored by compositors given other environmental factors. Repeated calls will be ignored.
243func (o *TextInputV3) HideInputPanel() error {
244	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 10, Name: "zwp_text_input_v3.hide_input_panel", Since: 2}); err != nil {
245		return err
246	}
247	return nil
248}
249
250// OnEnter registers a handler for the enter event.
251//
252// Handlers are appended, so a second call adds another handler rather than
253// replacing the first. Registration is safe while another goroutine dispatches.
254func (o *TextInputV3) OnEnter(handler func(surfaceID uint32)) {
255	if handler == nil {
256		return
257	}
258	o.handlersMu.Lock()
259	defer o.handlersMu.Unlock()
260	o.onEnter = append(o.onEnter, handler)
261}
262
263// handlersForEnter returns the handlers registered for enter, taken
264// under the lock so a handler may register another handler while events are
265// being dispatched.
266func (o *TextInputV3) handlersForEnter() []func(surfaceID uint32) {
267	o.handlersMu.Lock()
268	defer o.handlersMu.Unlock()
269	return o.onEnter
270}
271
272// OnLeave registers a handler for the leave event.
273//
274// Handlers are appended, so a second call adds another handler rather than
275// replacing the first. Registration is safe while another goroutine dispatches.
276func (o *TextInputV3) OnLeave(handler func(surfaceID uint32)) {
277	if handler == nil {
278		return
279	}
280	o.handlersMu.Lock()
281	defer o.handlersMu.Unlock()
282	o.onLeave = append(o.onLeave, handler)
283}
284
285// handlersForLeave returns the handlers registered for leave, taken
286// under the lock so a handler may register another handler while events are
287// being dispatched.
288func (o *TextInputV3) handlersForLeave() []func(surfaceID uint32) {
289	o.handlersMu.Lock()
290	defer o.handlersMu.Unlock()
291	return o.onLeave
292}
293
294// OnPreeditString registers a handler for the preedit_string event.
295//
296// Handlers are appended, so a second call adds another handler rather than
297// replacing the first. Registration is safe while another goroutine dispatches.
298func (o *TextInputV3) OnPreeditString(handler func(text string, cursorBegin int32, cursorEnd int32)) {
299	if handler == nil {
300		return
301	}
302	o.handlersMu.Lock()
303	defer o.handlersMu.Unlock()
304	o.onPreeditString = append(o.onPreeditString, handler)
305}
306
307// handlersForPreeditString returns the handlers registered for preedit_string, taken
308// under the lock so a handler may register another handler while events are
309// being dispatched.
310func (o *TextInputV3) handlersForPreeditString() []func(text string, cursorBegin int32, cursorEnd int32) {
311	o.handlersMu.Lock()
312	defer o.handlersMu.Unlock()
313	return o.onPreeditString
314}
315
316// OnCommitString registers a handler for the commit_string event.
317//
318// Handlers are appended, so a second call adds another handler rather than
319// replacing the first. Registration is safe while another goroutine dispatches.
320func (o *TextInputV3) OnCommitString(handler func(text string)) {
321	if handler == nil {
322		return
323	}
324	o.handlersMu.Lock()
325	defer o.handlersMu.Unlock()
326	o.onCommitString = append(o.onCommitString, handler)
327}
328
329// handlersForCommitString returns the handlers registered for commit_string, taken
330// under the lock so a handler may register another handler while events are
331// being dispatched.
332func (o *TextInputV3) handlersForCommitString() []func(text string) {
333	o.handlersMu.Lock()
334	defer o.handlersMu.Unlock()
335	return o.onCommitString
336}
337
338// OnDeleteSurroundingText registers a handler for the delete_surrounding_text event.
339//
340// Handlers are appended, so a second call adds another handler rather than
341// replacing the first. Registration is safe while another goroutine dispatches.
342func (o *TextInputV3) OnDeleteSurroundingText(handler func(beforeLength uint32, afterLength uint32)) {
343	if handler == nil {
344		return
345	}
346	o.handlersMu.Lock()
347	defer o.handlersMu.Unlock()
348	o.onDeleteSurroundingText = append(o.onDeleteSurroundingText, handler)
349}
350
351// handlersForDeleteSurroundingText returns the handlers registered for delete_surrounding_text, taken
352// under the lock so a handler may register another handler while events are
353// being dispatched.
354func (o *TextInputV3) handlersForDeleteSurroundingText() []func(beforeLength uint32, afterLength uint32) {
355	o.handlersMu.Lock()
356	defer o.handlersMu.Unlock()
357	return o.onDeleteSurroundingText
358}
359
360// OnDone registers a handler for the done event.
361//
362// Handlers are appended, so a second call adds another handler rather than
363// replacing the first. Registration is safe while another goroutine dispatches.
364func (o *TextInputV3) OnDone(handler func(serial uint32)) {
365	if handler == nil {
366		return
367	}
368	o.handlersMu.Lock()
369	defer o.handlersMu.Unlock()
370	o.onDone = append(o.onDone, handler)
371}
372
373// handlersForDone returns the handlers registered for done, taken
374// under the lock so a handler may register another handler while events are
375// being dispatched.
376func (o *TextInputV3) handlersForDone() []func(serial uint32) {
377	o.handlersMu.Lock()
378	defer o.handlersMu.Unlock()
379	return o.onDone
380}
381
382// OnAction registers a handler for the action event.
383//
384// Handlers are appended, so a second call adds another handler rather than
385// replacing the first. Registration is safe while another goroutine dispatches.
386func (o *TextInputV3) OnAction(handler func(action uint32, serial uint32)) {
387	if handler == nil {
388		return
389	}
390	o.handlersMu.Lock()
391	defer o.handlersMu.Unlock()
392	o.onAction = append(o.onAction, handler)
393}
394
395// handlersForAction returns the handlers registered for action, taken
396// under the lock so a handler may register another handler while events are
397// being dispatched.
398func (o *TextInputV3) handlersForAction() []func(action uint32, serial uint32) {
399	o.handlersMu.Lock()
400	defer o.handlersMu.Unlock()
401	return o.onAction
402}
403
404// OnLanguage registers a handler for the language event.
405//
406// Handlers are appended, so a second call adds another handler rather than
407// replacing the first. Registration is safe while another goroutine dispatches.
408func (o *TextInputV3) OnLanguage(handler func(language string)) {
409	if handler == nil {
410		return
411	}
412	o.handlersMu.Lock()
413	defer o.handlersMu.Unlock()
414	o.onLanguage = append(o.onLanguage, handler)
415}
416
417// handlersForLanguage returns the handlers registered for language, taken
418// under the lock so a handler may register another handler while events are
419// being dispatched.
420func (o *TextInputV3) handlersForLanguage() []func(language string) {
421	o.handlersMu.Lock()
422	defer o.handlersMu.Unlock()
423	return o.onLanguage
424}
425
426// OnPreeditHint registers a handler for the preedit_hint event.
427//
428// Handlers are appended, so a second call adds another handler rather than
429// replacing the first. Registration is safe while another goroutine dispatches.
430func (o *TextInputV3) OnPreeditHint(handler func(start uint32, end uint32, hint uint32)) {
431	if handler == nil {
432		return
433	}
434	o.handlersMu.Lock()
435	defer o.handlersMu.Unlock()
436	o.onPreeditHint = append(o.onPreeditHint, handler)
437}
438
439// handlersForPreeditHint returns the handlers registered for preedit_hint, taken
440// under the lock so a handler may register another handler while events are
441// being dispatched.
442func (o *TextInputV3) handlersForPreeditHint() []func(start uint32, end uint32, hint uint32) {
443	o.handlersMu.Lock()
444	defer o.handlersMu.Unlock()
445	return o.onPreeditHint
446}
447
448// EventSignature returns the declared event argument types in wire order.
449func (o *TextInputV3) EventSignature(opcode uint16) (string, bool) {
450	switch opcode {
451	case 0:
452		return "object,", true
453	case 1:
454		return "object,", true
455	case 2:
456		return "string,int,int,", true
457	case 3:
458		return "string,", true
459	case 4:
460		return "uint,uint,", true
461	case 5:
462		return "uint,", true
463	case 6:
464		return "uint,uint,", true
465	case 7:
466		return "string,", true
467	case 8:
468		return "uint,uint,uint,", true
469	default:
470		return "", false
471	}
472}
473
474// Dispatch decodes one event on zwp_text_input_v3 and calls the registered handlers.
475func (o *TextInputV3) Dispatch(event *wl.Event) {
476	switch event.Opcode {
477	case 0: // enter
478		surfaceID := event.Uint32()
479
480		for i, handler := range o.handlersForEnter() {
481			_ = i
482			handler(surfaceID)
483		}
484	case 1: // leave
485		surfaceID := event.Uint32()
486
487		for i, handler := range o.handlersForLeave() {
488			_ = i
489			handler(surfaceID)
490		}
491	case 2: // preedit_string
492		text := event.String()
493		cursorBegin := event.Int32()
494		cursorEnd := event.Int32()
495
496		for i, handler := range o.handlersForPreeditString() {
497			_ = i
498			handler(text, cursorBegin, cursorEnd)
499		}
500	case 3: // commit_string
501		text := event.String()
502
503		for i, handler := range o.handlersForCommitString() {
504			_ = i
505			handler(text)
506		}
507	case 4: // delete_surrounding_text
508		beforeLength := event.Uint32()
509		afterLength := event.Uint32()
510
511		for i, handler := range o.handlersForDeleteSurroundingText() {
512			_ = i
513			handler(beforeLength, afterLength)
514		}
515	case 5: // done
516		serial := event.Uint32()
517
518		for i, handler := range o.handlersForDone() {
519			_ = i
520			handler(serial)
521		}
522	case 6: // action
523		action := event.Uint32()
524		serial := event.Uint32()
525
526		for i, handler := range o.handlersForAction() {
527			_ = i
528			handler(action, serial)
529		}
530	case 7: // language
531		language := event.String()
532
533		for i, handler := range o.handlersForLanguage() {
534			_ = i
535			handler(language)
536		}
537	case 8: // preedit_hint
538		start := event.Uint32()
539		end := event.Uint32()
540		hint := event.Uint32()
541
542		for i, handler := range o.handlersForPreeditHint() {
543			_ = i
544			handler(start, end, hint)
545		}
546	default:
547	}
548}
549
550// TextInputManagerV3Interface is the protocol interface name.
551const TextInputManagerV3Interface = "zwp_text_input_manager_v3"
552
553// TextInputManagerV3 is the generated binding for zwp_text_input_manager_v3 version 2.
554type TextInputManagerV3 struct {
555	wl.BaseProxy
556}
557
558// NewTextInputManagerV3 returns an unbound TextInputManagerV3.
559func NewTextInputManagerV3(ctx *wl.Context) *TextInputManagerV3 {
560	obj := &TextInputManagerV3{}
561	obj.SetContext(ctx)
562	ctx.Register(obj)
563	return obj
564}
565
566// Destroy the wp_text_input_manager object.
567func (o *TextInputManagerV3) Destroy() error {
568	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 0, Name: "zwp_text_input_manager_v3.destroy", Destructor: true}); err != nil {
569		return err
570	}
571	return nil
572}
573
574// Creates a new text-input object for a given seat.
575func (o *TextInputManagerV3) GetTextInput(seat *cross_wl_seat.Seat) (*TextInputV3, error) {
576	var arg1 wl.Object
577	if seat != nil {
578		arg1 = seat
579	}
580	child := &TextInputV3{}
581	child.SetContext(o.Context())
582	if err := o.Context().Request(wl.Request{Proxy: o, Opcode: 1, Name: "zwp_text_input_manager_v3.get_text_input", Child: child}, child, arg1); err != nil {
583		return nil, err
584	}
585	return child, nil
586}
587
588// EventSignature returns the declared event argument types in wire order.
589func (o *TextInputManagerV3) EventSignature(opcode uint16) (string, bool) {
590	switch opcode {
591	default:
592		return "", false
593	}
594}
595
596// Dispatch decodes one event on zwp_text_input_manager_v3 and calls the registered handlers.
597func (o *TextInputManagerV3) Dispatch(event *wl.Event) {
598	switch event.Opcode {
599	default:
600	}
601}

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 8

↑↓ moveenter openesc close