FcitxG.Client

g FcitxG.Client FcitxG.Client GObject.Object GObject.Object GObject.Object->FcitxG.Client

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_with_watcher (watcher)

focus_in ()

focus_out ()

get_uuid ()

is_valid ()

next_page ()

prev_page ()

process_key (keyval, keycode, state, isRelease, t, timeout_msec, cancellable, callback, *user_data)

process_key_finish (res)

process_key_sync (keyval, keycode, state, isRelease, t)

reset ()

select_candidate (index)

set_capability (flags)

set_cursor_rect (x, y, w, h)

set_cursor_rect_with_scale_factor (x, y, w, h, scale)

set_display (display)

set_program (program)

set_surrounding_text (text, cursor, anchor)

set_use_batch_process_key_event (batch)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

watcher

FcitxG.Watcher

w/co

Fcitx Watcher

Signals

Inherited:

GObject.Object (1)

Name

Short Description

commit-string

Emit when input method commit one string

connected

Emit when connected to fcitx and created ic

current-im

Emit when input method used in input context changed

delete-surrounding-text

Emit when input method need to delete surrounding text

forward-key

Emit when input method ask for forward a key

notify-focus-out

Emit when focus out happens on server side

update-client-side-ui

Emit when input method needs to update the client-side user interface

update-formatted-preedit

Emit when input method needs to update formatted preedit

Fields

Inherited:

GObject.Object (1)

Class Details

class FcitxG.Client(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

FcitxG.ClientClass

A FcitxG.Client allow to create a input context via DBus

classmethod new()
Returns:

A newly allocated FcitxG.Client

Return type:

FcitxG.Client

New a FcitxG.Client

classmethod new_with_watcher(watcher)
Parameters:

watcher (FcitxG.Watcher) – the FcitxG.Watcher to be used with this client

Returns:

A newly allocated FcitxG.Client

Return type:

FcitxG.Client

New a FcitxG.Client

focus_in()

tell fcitx current client has focus

focus_out()

tell fcitx current client has lost focus

get_uuid()
Returns:

the current uuid of input context.

Return type:

int

is_valid()
Returns:

FcitxG.Client is valid or not

Return type:

bool

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:

use this function with FcitxG.Client.process_key_finish

process_key_finish(res)
Parameters:

res (Gio.AsyncResult) – result

Returns:

process key result

Return type:

bool

use this function with #fcitx_g_client_process_key_async

process_key_sync(keyval, keycode, state, isRelease, t)
Parameters:
  • keyval (int) – key value

  • keycode (int) – hardware key code

  • state (int) – key state

  • isRelease (bool) – is key release

  • t (int) – timestamp

Returns:

the key is processed or not

Return type:

bool

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_capability(flags)
Parameters:

flags (int) – capability

set client capability of input context.

set_cursor_rect(x, y, w, h)
Parameters:
  • x (int) – x of cursor

  • y (int) – y of cursor

  • w (int) – width of cursor

  • h (int) – height of cursor

tell fcitx current client’s cursor geometry info

set_cursor_rect_with_scale_factor(x, y, w, h, scale)
Parameters:
  • x (int) – x of cursor

  • y (int) – y of cursor

  • w (int) – width of cursor

  • h (int) – height of cursor

  • scale (float) – scale factor of surface

tell fcitx current client’s cursor geometry info

set_display(display)
Parameters:

display (str) – display name

Set the display name

set_program(program)
Parameters:

program (str) – program name

Set the program name

set_surrounding_text(text, cursor, anchor)
Parameters:
  • text (str or None) – surroundng text

  • cursor (int) – cursor position coresponding to text

  • anchor (int) – anchor position coresponding to text

set_use_batch_process_key_event(batch)
Parameters:

batch (bool) – whether use ProcessKeyEventBatch

Set whether use ProcessKeyEventBatch if supports, default is true.

Signal Details

FcitxG.Client.signals.commit_string(client, string)
Signal Name:

commit-string

Flags:

RUN_LAST

Parameters:
  • client (FcitxG.Client) – The object which received the signal

  • string (str) – string to be commited

Emit when input method commit one string

FcitxG.Client.signals.connected(client)
Signal Name:

connected

Flags:

RUN_LAST

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:

RUN_LAST

Parameters:
  • client (FcitxG.Client) – The object which received the signal

  • name (str) – name of input method

  • unique_name (str) – unique name of input method

  • lang_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:

RUN_LAST

Parameters:
  • client (FcitxG.Client) – The object which received the signal

  • cursor (int) – deletion start

  • len (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:

RUN_LAST

Parameters:
  • client (FcitxG.Client) – The object which received the signal

  • keyval (int) – key value

  • state (int) – key state

  • type (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:

RUN_LAST

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:

RUN_LAST

Parameters:

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:

RUN_LAST

Parameters:

Emit when input method needs to update formatted preedit

Property Details

FcitxG.Client.props.watcher
Name:

watcher

Type:

FcitxG.Watcher

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

Fcitx Watcher