Documentation
¶
Index ¶
- Constants
- type ZwpInputMethodContextV1
- func (p *ZwpInputMethodContextV1) AddCommitStateHandler(h ZwpInputMethodContextV1CommitStateHandler)
- func (p *ZwpInputMethodContextV1) AddContentTypeHandler(h ZwpInputMethodContextV1ContentTypeHandler)
- func (p *ZwpInputMethodContextV1) AddInvokeActionHandler(h ZwpInputMethodContextV1InvokeActionHandler)
- func (p *ZwpInputMethodContextV1) AddPreferredLanguageHandler(h ZwpInputMethodContextV1PreferredLanguageHandler)
- func (p *ZwpInputMethodContextV1) AddResetHandler(h ZwpInputMethodContextV1ResetHandler)
- func (p *ZwpInputMethodContextV1) AddSurroundingTextHandler(h ZwpInputMethodContextV1SurroundingTextHandler)
- func (p *ZwpInputMethodContextV1) CommitString(serial uint32, text string) error
- func (p *ZwpInputMethodContextV1) CursorPosition(index int32, anchor int32) error
- func (p *ZwpInputMethodContextV1) DeleteSurroundingText(index int32, length uint32) error
- func (p *ZwpInputMethodContextV1) Destroy() error
- func (p *ZwpInputMethodContextV1) Dispatch(event *wl.Event)
- func (p *ZwpInputMethodContextV1) GrabKeyboard() (*wl.Keyboard, error)
- func (p *ZwpInputMethodContextV1) Key(serial uint32, time uint32, key uint32, state uint32) error
- func (p *ZwpInputMethodContextV1) Keysym(serial uint32, time uint32, sym uint32, state uint32, modifiers uint32) error
- func (p *ZwpInputMethodContextV1) Language(serial uint32, language string) error
- func (p *ZwpInputMethodContextV1) Modifiers(serial uint32, modsDepressed uint32, modsLatched uint32, modsLocked uint32, ...) error
- func (p *ZwpInputMethodContextV1) ModifiersMap(map_ []int32) error
- func (p *ZwpInputMethodContextV1) PreeditCursor(index int32) error
- func (p *ZwpInputMethodContextV1) PreeditString(serial uint32, text string, commit string) error
- func (p *ZwpInputMethodContextV1) PreeditStyling(index uint32, length uint32, style uint32) error
- func (p *ZwpInputMethodContextV1) RemoveCommitStateHandler(h ZwpInputMethodContextV1CommitStateHandler)
- func (p *ZwpInputMethodContextV1) RemoveContentTypeHandler(h ZwpInputMethodContextV1ContentTypeHandler)
- func (p *ZwpInputMethodContextV1) RemoveInvokeActionHandler(h ZwpInputMethodContextV1InvokeActionHandler)
- func (p *ZwpInputMethodContextV1) RemovePreferredLanguageHandler(h ZwpInputMethodContextV1PreferredLanguageHandler)
- func (p *ZwpInputMethodContextV1) RemoveResetHandler(h ZwpInputMethodContextV1ResetHandler)
- func (p *ZwpInputMethodContextV1) RemoveSurroundingTextHandler(h ZwpInputMethodContextV1SurroundingTextHandler)
- func (p *ZwpInputMethodContextV1) TextDirection(serial uint32, direction uint32) error
- type ZwpInputMethodContextV1CommitStateEvent
- type ZwpInputMethodContextV1CommitStateHandler
- type ZwpInputMethodContextV1ContentTypeEvent
- type ZwpInputMethodContextV1ContentTypeHandler
- type ZwpInputMethodContextV1InvokeActionEvent
- type ZwpInputMethodContextV1InvokeActionHandler
- type ZwpInputMethodContextV1PreferredLanguageEvent
- type ZwpInputMethodContextV1PreferredLanguageHandler
- type ZwpInputMethodContextV1ResetEvent
- type ZwpInputMethodContextV1ResetHandler
- type ZwpInputMethodContextV1SurroundingTextEvent
- type ZwpInputMethodContextV1SurroundingTextHandler
- type ZwpInputMethodV1
- func (p *ZwpInputMethodV1) AddActivateHandler(h ZwpInputMethodV1ActivateHandler)
- func (p *ZwpInputMethodV1) AddDeactivateHandler(h ZwpInputMethodV1DeactivateHandler)
- func (p *ZwpInputMethodV1) Dispatch(event *wl.Event)
- func (p *ZwpInputMethodV1) RemoveActivateHandler(h ZwpInputMethodV1ActivateHandler)
- func (p *ZwpInputMethodV1) RemoveDeactivateHandler(h ZwpInputMethodV1DeactivateHandler)
- type ZwpInputMethodV1ActivateEvent
- type ZwpInputMethodV1ActivateHandler
- type ZwpInputMethodV1DeactivateEvent
- type ZwpInputMethodV1DeactivateHandler
- type ZwpInputPanelSurfaceV1
- type ZwpInputPanelV1
Constants ¶
const (
ZwpInputPanelSurfaceV1PositionCenterBottom = 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZwpInputMethodContextV1 ¶
func NewZwpInputMethodContextV1 ¶
func NewZwpInputMethodContextV1(ctx *wl.Context) *ZwpInputMethodContextV1
func (*ZwpInputMethodContextV1) AddCommitStateHandler ¶
func (p *ZwpInputMethodContextV1) AddCommitStateHandler(h ZwpInputMethodContextV1CommitStateHandler)
func (*ZwpInputMethodContextV1) AddContentTypeHandler ¶
func (p *ZwpInputMethodContextV1) AddContentTypeHandler(h ZwpInputMethodContextV1ContentTypeHandler)
func (*ZwpInputMethodContextV1) AddInvokeActionHandler ¶
func (p *ZwpInputMethodContextV1) AddInvokeActionHandler(h ZwpInputMethodContextV1InvokeActionHandler)
func (*ZwpInputMethodContextV1) AddPreferredLanguageHandler ¶
func (p *ZwpInputMethodContextV1) AddPreferredLanguageHandler(h ZwpInputMethodContextV1PreferredLanguageHandler)
func (*ZwpInputMethodContextV1) AddResetHandler ¶
func (p *ZwpInputMethodContextV1) AddResetHandler(h ZwpInputMethodContextV1ResetHandler)
func (*ZwpInputMethodContextV1) AddSurroundingTextHandler ¶
func (p *ZwpInputMethodContextV1) AddSurroundingTextHandler(h ZwpInputMethodContextV1SurroundingTextHandler)
func (*ZwpInputMethodContextV1) CommitString ¶
func (p *ZwpInputMethodContextV1) CommitString(serial uint32, text string) error
CommitString will commit string.
Send the commit string text for insertion to the application.
The text to commit could be either just a single character after a key press or the result of some composing (pre-edit). It could be also an empty text when some text should be removed (see delete_surrounding_text) or when the input cursor should be moved (see cursor_position).
Any previously set composing text will be removed.
func (*ZwpInputMethodContextV1) CursorPosition ¶
func (p *ZwpInputMethodContextV1) CursorPosition(index int32, anchor int32) error
CursorPosition will set cursor to a new position.
Set the cursor and anchor to a new position. Index is the new cursor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). Anchor is the new anchor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). When there should be no selected text, anchor should be the same as index.
This request will be handled on the text_input side directly following a commit_string request.
func (*ZwpInputMethodContextV1) DeleteSurroundingText ¶
func (p *ZwpInputMethodContextV1) DeleteSurroundingText(index int32, length uint32) error
DeleteSurroundingText will delete text.
Remove the surrounding text.
This request will be handled on the text_input side directly following a commit_string request.
func (*ZwpInputMethodContextV1) Destroy ¶
func (p *ZwpInputMethodContextV1) Destroy() error
Destroy will .
func (*ZwpInputMethodContextV1) Dispatch ¶
func (p *ZwpInputMethodContextV1) Dispatch(event *wl.Event)
func (*ZwpInputMethodContextV1) GrabKeyboard ¶
func (p *ZwpInputMethodContextV1) GrabKeyboard() (*wl.Keyboard, error)
GrabKeyboard will grab hardware keyboard.
Allow an input method to receive hardware keyboard input and process key events to generate text events (with pre-edit) over the wire. This allows input methods which compose multiple key events for inputting text like it is done for CJK languages.
func (*ZwpInputMethodContextV1) Key ¶
Key will forward key event.
Forward a wl_keyboard::key event to the client that was not processed by the input method itself. Should be used when filtering key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::key event.
For generating custom key events use the keysym request instead.
func (*ZwpInputMethodContextV1) Keysym ¶
func (p *ZwpInputMethodContextV1) Keysym(serial uint32, time uint32, sym uint32, state uint32, modifiers uint32) error
Keysym will keysym.
Notify when a key event was sent. Key events should not be used for normal text input operations, which should be done with commit_string, delete_surrounding_text, etc. The key event follows the wl_keyboard key event convention. Sym is an XKB keysym, state is a wl_keyboard key_state.
func (*ZwpInputMethodContextV1) Language ¶
func (p *ZwpInputMethodContextV1) Language(serial uint32, language string) error
Language will .
func (*ZwpInputMethodContextV1) Modifiers ¶
func (p *ZwpInputMethodContextV1) Modifiers(serial uint32, modsDepressed uint32, modsLatched uint32, modsLocked uint32, group uint32) error
Modifiers will forward modifiers event.
Forward a wl_keyboard::modifiers event to the client that was not processed by the input method itself. Should be used when filtering key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::modifiers event.
func (*ZwpInputMethodContextV1) ModifiersMap ¶
func (p *ZwpInputMethodContextV1) ModifiersMap(map_ []int32) error
ModifiersMap will .
func (*ZwpInputMethodContextV1) PreeditCursor ¶
func (p *ZwpInputMethodContextV1) PreeditCursor(index int32) error
PreeditCursor will pre-edit cursor.
Set the cursor position inside the composing text (as byte offset) relative to the start of the composing text.
When index is negative no cursor should be displayed.
This request should be sent before sending a preedit_string request.
func (*ZwpInputMethodContextV1) PreeditString ¶
func (p *ZwpInputMethodContextV1) PreeditString(serial uint32, text string, commit string) error
PreeditString will pre-edit string.
Send the pre-edit string text to the application text input.
The commit text can be used to replace the pre-edit text on reset (for example on unfocus).
Previously sent preedit_style and preedit_cursor requests are also processed by the text_input.
func (*ZwpInputMethodContextV1) PreeditStyling ¶
func (p *ZwpInputMethodContextV1) PreeditStyling(index uint32, length uint32, style uint32) error
PreeditStyling will pre-edit styling.
Set the styling information on composing text. The style is applied for length in bytes from index relative to the beginning of the composing text (as byte offset). Multiple styles can be applied to a composing text.
This request should be sent before sending a preedit_string request.
func (*ZwpInputMethodContextV1) RemoveCommitStateHandler ¶
func (p *ZwpInputMethodContextV1) RemoveCommitStateHandler(h ZwpInputMethodContextV1CommitStateHandler)
func (*ZwpInputMethodContextV1) RemoveContentTypeHandler ¶
func (p *ZwpInputMethodContextV1) RemoveContentTypeHandler(h ZwpInputMethodContextV1ContentTypeHandler)
func (*ZwpInputMethodContextV1) RemoveInvokeActionHandler ¶
func (p *ZwpInputMethodContextV1) RemoveInvokeActionHandler(h ZwpInputMethodContextV1InvokeActionHandler)
func (*ZwpInputMethodContextV1) RemovePreferredLanguageHandler ¶
func (p *ZwpInputMethodContextV1) RemovePreferredLanguageHandler(h ZwpInputMethodContextV1PreferredLanguageHandler)
func (*ZwpInputMethodContextV1) RemoveResetHandler ¶
func (p *ZwpInputMethodContextV1) RemoveResetHandler(h ZwpInputMethodContextV1ResetHandler)
func (*ZwpInputMethodContextV1) RemoveSurroundingTextHandler ¶
func (p *ZwpInputMethodContextV1) RemoveSurroundingTextHandler(h ZwpInputMethodContextV1SurroundingTextHandler)
func (*ZwpInputMethodContextV1) TextDirection ¶
func (p *ZwpInputMethodContextV1) TextDirection(serial uint32, direction uint32) error
TextDirection will .
type ZwpInputMethodContextV1CommitStateEvent ¶
type ZwpInputMethodContextV1CommitStateEvent struct {
Serial uint32
}
type ZwpInputMethodContextV1CommitStateHandler ¶
type ZwpInputMethodContextV1CommitStateHandler interface {
HandleZwpInputMethodContextV1CommitState(ZwpInputMethodContextV1CommitStateEvent)
}
type ZwpInputMethodContextV1ContentTypeHandler ¶
type ZwpInputMethodContextV1ContentTypeHandler interface {
HandleZwpInputMethodContextV1ContentType(ZwpInputMethodContextV1ContentTypeEvent)
}
type ZwpInputMethodContextV1InvokeActionHandler ¶
type ZwpInputMethodContextV1InvokeActionHandler interface {
HandleZwpInputMethodContextV1InvokeAction(ZwpInputMethodContextV1InvokeActionEvent)
}
type ZwpInputMethodContextV1PreferredLanguageEvent ¶
type ZwpInputMethodContextV1PreferredLanguageEvent struct {
Language string
}
type ZwpInputMethodContextV1PreferredLanguageHandler ¶
type ZwpInputMethodContextV1PreferredLanguageHandler interface {
HandleZwpInputMethodContextV1PreferredLanguage(ZwpInputMethodContextV1PreferredLanguageEvent)
}
type ZwpInputMethodContextV1ResetEvent ¶
type ZwpInputMethodContextV1ResetEvent struct { }
type ZwpInputMethodContextV1ResetHandler ¶
type ZwpInputMethodContextV1ResetHandler interface {
HandleZwpInputMethodContextV1Reset(ZwpInputMethodContextV1ResetEvent)
}
type ZwpInputMethodContextV1SurroundingTextHandler ¶
type ZwpInputMethodContextV1SurroundingTextHandler interface {
HandleZwpInputMethodContextV1SurroundingText(ZwpInputMethodContextV1SurroundingTextEvent)
}
type ZwpInputMethodV1 ¶
func NewZwpInputMethodV1 ¶
func NewZwpInputMethodV1(ctx *wl.Context) *ZwpInputMethodV1
func (*ZwpInputMethodV1) AddActivateHandler ¶
func (p *ZwpInputMethodV1) AddActivateHandler(h ZwpInputMethodV1ActivateHandler)
func (*ZwpInputMethodV1) AddDeactivateHandler ¶
func (p *ZwpInputMethodV1) AddDeactivateHandler(h ZwpInputMethodV1DeactivateHandler)
func (*ZwpInputMethodV1) Dispatch ¶
func (p *ZwpInputMethodV1) Dispatch(event *wl.Event)
func (*ZwpInputMethodV1) RemoveActivateHandler ¶
func (p *ZwpInputMethodV1) RemoveActivateHandler(h ZwpInputMethodV1ActivateHandler)
func (*ZwpInputMethodV1) RemoveDeactivateHandler ¶
func (p *ZwpInputMethodV1) RemoveDeactivateHandler(h ZwpInputMethodV1DeactivateHandler)
type ZwpInputMethodV1ActivateEvent ¶
type ZwpInputMethodV1ActivateEvent struct {
Id *ZwpInputMethodContextV1
}
type ZwpInputMethodV1ActivateHandler ¶
type ZwpInputMethodV1ActivateHandler interface {
HandleZwpInputMethodV1Activate(ZwpInputMethodV1ActivateEvent)
}
type ZwpInputMethodV1DeactivateEvent ¶
type ZwpInputMethodV1DeactivateEvent struct {
Context *ZwpInputMethodContextV1
}
type ZwpInputMethodV1DeactivateHandler ¶
type ZwpInputMethodV1DeactivateHandler interface {
HandleZwpInputMethodV1Deactivate(ZwpInputMethodV1DeactivateEvent)
}
type ZwpInputPanelSurfaceV1 ¶
func NewZwpInputPanelSurfaceV1 ¶
func NewZwpInputPanelSurfaceV1(ctx *wl.Context) *ZwpInputPanelSurfaceV1
func (*ZwpInputPanelSurfaceV1) SetOverlayPanel ¶
func (p *ZwpInputPanelSurfaceV1) SetOverlayPanel() error
SetOverlayPanel will set the surface type as an overlay panel.
Set the input_panel_surface to be an overlay panel.
This is shown near the input cursor above the application window when a text input is active.
func (*ZwpInputPanelSurfaceV1) SetToplevel ¶
func (p *ZwpInputPanelSurfaceV1) SetToplevel(output *wl.Output, position uint32) error
SetToplevel will set the surface type as a keyboard.
Set the input_panel_surface type to keyboard.
A keyboard surface is only shown when a text input is active.
type ZwpInputPanelV1 ¶
func NewZwpInputPanelV1 ¶
func NewZwpInputPanelV1(ctx *wl.Context) *ZwpInputPanelV1
func (*ZwpInputPanelV1) GetInputPanelSurface ¶
func (p *ZwpInputPanelV1) GetInputPanelSurface(surface *wl.Surface) (*ZwpInputPanelSurfaceV1, error)
GetInputPanelSurface will .