SkkCandidateList

SkkCandidateList — Base abstract class of candidate list.

Functions

Properties

gint cursor-pos Read
guint page-size Read / Write
guint page-start Read / Write
gboolean page-visible Read
gint size Read

Signals

void populated Run Last
void selected Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── SkkCandidateList

Description

Functions

skk_candidate_list_get ()

SkkCandidate *
skk_candidate_list_get (SkkCandidateList *self,
                        gint index);

Get the current candidate at the given index.

Parameters

self

the SkkCandidateList instance

 

index

 .

candidate position (-1 for the current cursor position)

.

[in]

Returns

a Candidate


skk_candidate_list_cursor_up ()

gboolean
skk_candidate_list_cursor_up (SkkCandidateList *self);

Move cursor to the previous candidate.

Parameters

self

the SkkCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise.


skk_candidate_list_cursor_down ()

gboolean
skk_candidate_list_cursor_down (SkkCandidateList *self);

Move cursor to the next candidate.

Parameters

self

the SkkCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


skk_candidate_list_page_up ()

gboolean
skk_candidate_list_page_up (SkkCandidateList *self);

Move cursor to the previous page.

Parameters

self

the SkkCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


skk_candidate_list_page_down ()

gboolean
skk_candidate_list_page_down (SkkCandidateList *self);

Move cursor to the next page.

Parameters

self

the SkkCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


skk_candidate_list_next ()

gboolean
skk_candidate_list_next (SkkCandidateList *self);

Move cursor forward.

Parameters

self

the SkkCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


skk_candidate_list_previous ()

gboolean
skk_candidate_list_previous (SkkCandidateList *self);

Move cursor backward.

Parameters

self

the SkkCandidateList instance

 

Returns

`true` if cursor position has changed, `false` otherwise


skk_candidate_list_select_at ()

gboolean
skk_candidate_list_select_at (SkkCandidateList *self,
                              guint index_in_page);

Select a candidate in the current page.

Parameters

self

the SkkCandidateList instance

 

index_in_page

 .

cursor position in the page to select

.

[in]

Returns

`true` if a candidate is selected, `false` otherwise


skk_candidate_list_select ()

void
skk_candidate_list_select (SkkCandidateList *self);

Select the current candidate.

Parameters

self

the SkkCandidateList instance

 

skk_candidate_list_get_cursor_pos ()

gint
skk_candidate_list_get_cursor_pos (SkkCandidateList *self);

Get and return the current value of the "cursor-pos" property.

Current cursor position.

Parameters

self

the SkkCandidateList instance to query

 

Returns

the value of the "cursor-pos" property


skk_candidate_list_get_size ()

gint
skk_candidate_list_get_size (SkkCandidateList *self);

Get and return the current value of the "size" property.

The number of candidate in the candidate list.

Parameters

self

the SkkCandidateList instance to query

 

Returns

the value of the "size" property


skk_candidate_list_get_page_start ()

guint
skk_candidate_list_get_page_start (SkkCandidateList *self);

Get and return the current value of the "page-start" property.

Starting index of paging.

Parameters

self

the SkkCandidateList instance to query

 

Returns

the value of the "page-start" property


skk_candidate_list_set_page_start ()

void
skk_candidate_list_set_page_start (SkkCandidateList *self,
                                   guint value);

Set the value of the "page-start" property to value .

Starting index of paging.

Parameters

self

the SkkCandidateList instance to modify

 

value

the new value of the "page-start" property

 

skk_candidate_list_get_page_size ()

guint
skk_candidate_list_get_page_size (SkkCandidateList *self);

Get and return the current value of the "page-size" property.

Page size.

Parameters

self

the SkkCandidateList instance to query

 

Returns

the value of the "page-size" property


skk_candidate_list_set_page_size ()

void
skk_candidate_list_set_page_size (SkkCandidateList *self,
                                  guint value);

Set the value of the "page-size" property to value .

Page size.

Parameters

self

the SkkCandidateList instance to modify

 

value

the new value of the "page-size" property

 

skk_candidate_list_get_page_visible ()

gboolean
skk_candidate_list_get_page_visible (SkkCandidateList *self);

Get and return the current value of the "page-visible" property.

Flag to indicate whether page (lookup table) is visible.

Parameters

self

the SkkCandidateList instance to query

 

Returns

the value of the "page-visible" property

Types and Values

SKK_TYPE_CANDIDATE_LIST

#define SKK_TYPE_CANDIDATE_LIST (skk_candidate_list_get_type ())

The type for SkkCandidateList.


struct SkkCandidateList

struct SkkCandidateList;

Base abstract class of candidate list.


struct SkkCandidateListClass

struct SkkCandidateListClass {
	GObjectClass parent_class;
	SkkCandidate* (*get) (SkkCandidateList* self, gint index);
	void (*clear) (SkkCandidateList* self);
	void (*add_candidates) (SkkCandidateList* self, SkkCandidate** array, gint array_length1);
	void (*add_candidates_end) (SkkCandidateList* self);
	gboolean (*cursor_up) (SkkCandidateList* self);
	gboolean (*cursor_down) (SkkCandidateList* self);
	gboolean (*page_up) (SkkCandidateList* self);
	gboolean (*page_down) (SkkCandidateList* self);
	gboolean (*next) (SkkCandidateList* self);
	gboolean (*previous) (SkkCandidateList* self);
	gboolean (*select_at) (SkkCandidateList* self, guint index_in_page);
	void (*select) (SkkCandidateList* self);
	gint (*get_cursor_pos) (SkkCandidateList* self);
	gint (*get_size) (SkkCandidateList* self);
	guint (*get_page_start) (SkkCandidateList* self);
	void (*set_page_start) (SkkCandidateList* self, guint value);
	guint (*get_page_size) (SkkCandidateList* self);
	void (*set_page_size) (SkkCandidateList* self, guint value);
	gboolean (*get_page_visible) (SkkCandidateList* self);
};

The class structure for SKK_TYPE_CANDIDATE_LIST. All the fields in this structure are private and should never be accessed directly.

Members

get ()

   

clear ()

   

add_candidates ()

   

add_candidates_end ()

   

cursor_up ()

virtual method called by skk_candidate_list_cursor_up()

 

cursor_down ()

virtual method called by skk_candidate_list_cursor_down()

 

page_up ()

virtual method called by skk_candidate_list_page_up()

 

page_down ()

virtual method called by skk_candidate_list_page_down()

 

next ()

virtual method called by skk_candidate_list_next()

 

previous ()

virtual method called by skk_candidate_list_previous()

 

select_at ()

virtual method called by skk_candidate_list_select_at()

 

select ()

virtual method called by skk_candidate_list_select()

 

get_cursor_pos ()

getter method for the abstract property "cursor-pos"

 

get_size ()

getter method for the abstract property "size"

 

get_page_start ()

getter method for the abstract property "page-start"

 

set_page_start ()

setter method for the abstract property "page-start"

 

get_page_size ()

getter method for the abstract property "page-size"

 

set_page_size ()

setter method for the abstract property "page-size"

 

get_page_visible ()

getter method for the abstract property "page-visible"

 

Property Details

The “cursor-pos” property

  “cursor-pos”               gint

Current cursor position.

Owner: SkkCandidateList

Flags: Read

Default value: 0


The “page-size” property

  “page-size”                guint

Page size.

Owner: SkkCandidateList

Flags: Read / Write

Default value: 0


The “page-start” property

  “page-start”               guint

Starting index of paging.

Owner: SkkCandidateList

Flags: Read / Write

Default value: 0


The “page-visible” property

  “page-visible”             gboolean

Flag to indicate whether page (lookup table) is visible.

Owner: SkkCandidateList

Flags: Read

Default value: FALSE


The “size” property

  “size”                     gint

The number of candidate in the candidate list.

Owner: SkkCandidateList

Flags: Read

Default value: 0

Signal Details

The “populated” signal

void
user_function (SkkCandidateList *candidate_list,
               gpointer          user_data)

Signal emitted when candidates are filled and ready for traversal.

Parameters

candidate_list

the SkkCandidateList instance that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “selected” signal

void
user_function (SkkCandidateList *candidate_list,
               SkkCandidate     *candidate,
               gpointer          user_data)

Signal emitted when a candidate is selected.

Parameters

candidate_list

the SkkCandidateList instance that received the signal

 

candidate

 .

selected candidate

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last