FcitxG.Client¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
w/co |
Fcitx Watcher |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emit when input method commit one string |
|
Emit when connected to fcitx and created ic |
|
Emit when input method used in input context changed |
|
Emit when input method need to delete surrounding text |
|
Emit when input method ask for forward a key |
|
Emit when focus out happens on server side |
|
Emit when input method needs to update the client-side user interface |
|
Emit when input method needs to update formatted preedit |
Fields¶
- Inherited:
Class Details¶
- class FcitxG.Client(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
FcitxG.Client
allow to create a input context via DBus- classmethod new()¶
- Returns:
A newly allocated
FcitxG.Client
- Return type:
New a
FcitxG.Client
- classmethod new_with_watcher(watcher)¶
- Parameters:
watcher (
FcitxG.Watcher
) – theFcitxG.Watcher
to be used with this client- Returns:
A newly allocated
FcitxG.Client
- Return type:
New a
FcitxG.Client
- focus_in()¶
tell fcitx current client has focus
- focus_out()¶
tell fcitx current client has lost focus
- is_valid()¶
- Returns:
FcitxG.Client
is valid or not- Return type:
Check
FcitxG.Client
is valid to communicate with Fcitx
- next_page()¶
- prev_page()¶
- process_key(keyval, keycode, state, isRelease, t, timeout_msec, cancellable, callback, *user_data)¶
- Parameters:
keyval (
int
) – key valuekeycode (
int
) – hardware key codestate (
int
) – key stateisRelease (
bool
) – event type is key releaset (
int
) – timestamptimeout_msec (
int
) – timeout in millisecondcancellable (
Gio.Cancellable
orNone
) – cancellablecallback (
Gio.AsyncReadyCallback
orNone
) – callback
use this function with
FcitxG.Client.process_key_finish
- process_key_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – result- Returns:
process key result
- Return type:
use this function with #fcitx_g_client_process_key_async
- process_key_sync(keyval, keycode, state, isRelease, t)¶
- Parameters:
- Returns:
the key is processed or not
- Return type:
send a key event to fcitx synchronizely
- reset()¶
tell fcitx current client is reset from client side
- select_candidate(index)¶
- Parameters:
index (
int
) – Candidate index
tell fcitx current client to select candidate.
- set_cursor_rect(x, y, w, h)¶
- Parameters:
tell fcitx current client’s cursor geometry info
- set_cursor_rect_with_scale_factor(x, y, w, h, scale)¶
- Parameters:
tell fcitx current client’s cursor geometry info
- set_surrounding_text(text, cursor, anchor)¶
Signal Details¶
- FcitxG.Client.signals.commit_string(client, string)¶
- Signal Name:
commit-string
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signalstring (
str
) – string to be commited
Emit when input method commit one string
- FcitxG.Client.signals.connected(client)¶
- Signal Name:
connected
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signal
Emit when connected to fcitx and created ic
- FcitxG.Client.signals.current_im(client, name, unique_name, lang_code)¶
- Signal Name:
current-im
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signalname (
str
) – name of input methodunique_name (
str
) – unique name of input methodlang_code (
str
) – language code of input method
Emit when input method used in input context changed
- FcitxG.Client.signals.delete_surrounding_text(client, cursor, len)¶
- Signal Name:
delete-surrounding-text
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signalcursor (
int
) – deletion startlen (
int
) – deletion length
Emit when input method need to delete surrounding text
- FcitxG.Client.signals.forward_key(client, keyval, state, type)¶
- Signal Name:
forward-key
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signalkeyval (
int
) – key valuestate (
int
) – key statetype (
int
) – event type
Emit when input method ask for forward a key
- FcitxG.Client.signals.notify_focus_out(client)¶
- Signal Name:
notify-focus-out
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signal
Emit when focus out happens on server side
- FcitxG.Client.signals.update_client_side_ui(client, preedit, preedit_cursor, aux_up, aux_down, candidate_list, candidate_cursor, candidate_layout_hint, has_prev, has_next)¶
- Signal Name:
update-client-side-ui
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signalpreedit ([
FcitxG.PreeditItem
]) – AFcitxG.PreeditItem
Listpreedit_cursor (
int
) – preedit cursor position by utf8 byteaux_up ([
FcitxG.PreeditItem
]) – AFcitxG.PreeditItem
Listaux_down ([
FcitxG.PreeditItem
]) – AFcitxG.PreeditItem
Listcandidate_list ([
FcitxG.CandidateItem
]) – AFcitxG.CandidateItem
Listcandidate_cursor (
int
) – candidate cursor positioncandidate_layout_hint (
int
) – candidate layout hinthas_prev (
bool
) – has prev pagehas_next (
bool
) – has next page
Emit when input method needs to update the client-side user interface
- FcitxG.Client.signals.update_formatted_preedit(client, preedit, cursor)¶
- Signal Name:
update-formatted-preedit
- Flags:
- Parameters:
client (
FcitxG.Client
) – The object which received the signalpreedit ([
FcitxG.PreeditItem
]) – AFcitxG.PreeditItem
Listcursor (
int
) – cursor position by utf8 byte
Emit when input method needs to update formatted preedit
Property Details¶
- FcitxG.Client.props.watcher¶
- Name:
watcher
- Type:
- Default Value:
- Flags:
Fcitx Watcher