KkcKeymap

KkcKeymap — Object representing a keymap.

Functions

Properties

KkcKeymap * parent Read / Write

Types and Values

Object Hierarchy

    GBoxed
    ╰── KkcKeymapEntry
    GObject
    ╰── KkcKeymap

Description

Functions

kkc_keymap_entries ()

KkcKeymapEntry *
kkc_keymap_entries (KkcKeymap *self,
                    int *result_length1);

Return all the keymap entries including parent's.

Parameters

self

the KkcKeymap instance

 

Returns

array of KeymapEntry

.

[array length=result_length1]


kkc_keymap_local_entries ()

KkcKeymapEntry *
kkc_keymap_local_entries (KkcKeymap *self,
                          int *result_length1);

Return keymap entries not including parent's.

Parameters

self

the KkcKeymap instance

 

Returns

array of KeymapEntry

.

[array length=result_length1]


kkc_keymap_set ()

void
kkc_keymap_set (KkcKeymap *self,
                KkcKeyEvent *key,
                const gchar *command);

Bind a key event to a command.

Parameters

self

the KkcKeymap instance

 

key

 .

key event

.

[in]

command

 .

command or null to unset

.

[in][allow-none]

kkc_keymap_lookup_key ()

gchar *
kkc_keymap_lookup_key (KkcKeymap *self,
                       KkcKeyEvent *key);

Lookup a command bound to a key event.

Parameters

self

the KkcKeymap instance

 

key

 .

key event

.

[in]

Returns

command or `null`


kkc_keymap_where_is ()

KkcKeyEvent *
kkc_keymap_where_is (KkcKeymap *self,
                     const gchar *command);

Lookup a key event to which a command is bound.

Parameters

self

the KkcKeymap instance

 

command

 .

command

.

[in]

Returns

a key event or `null`


kkc_keymap_new ()

KkcKeymap *
kkc_keymap_new (void);

kkc_keymap_get_parent ()

KkcKeymap *
kkc_keymap_get_parent (KkcKeymap *self);

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

Parent keymap.

Parameters

self

the KkcKeymap instance to query

 

Returns

the value of the "parent" property


kkc_keymap_set_parent ()

void
kkc_keymap_set_parent (KkcKeymap *self,
                       KkcKeymap *value);

Set the value of the "parent" property to value .

Parent keymap.

Parameters

self

the KkcKeymap instance to modify

 

value

the new value of the "parent" property

 

kkc_keymap_commands ()

gchar **
kkc_keymap_commands (int *result_length1);

List commands usable in keymap.

Returns

array of commands

.

[array length=result_length1]


kkc_keymap_get_command_label ()

gchar *
kkc_keymap_get_command_label (const gchar *command);

Return a label for a command

Parameters

command

 .

command

.

[in]

Returns

label


kkc_keymap_entry_dup ()

KkcKeymapEntry *
kkc_keymap_entry_dup (const KkcKeymapEntry *self);

Creates a copy of self.

See also: kkc_keymap_entry_copy(), kkc_keymap_entry_destroy(), kkc_keymap_entry_free()

Parameters

self

the instance to duplicate

 

Returns

a copy of self , free with kkc_keymap_entry_free()


kkc_keymap_entry_free ()

void
kkc_keymap_entry_free (KkcKeymapEntry *self);

Frees the heap-allocated struct.

See also: kkc_keymap_entry_dup(), kkc_keymap_entry_copy(), kkc_keymap_entry_destroy()

Parameters

self

the struct to free

 

kkc_keymap_entry_copy ()

void
kkc_keymap_entry_copy (const KkcKeymapEntry *self,
                       KkcKeymapEntry *dest);

Creates a copy of self.

See also: kkc_keymap_entry_dup(), kkc_keymap_entry_destroy(), kkc_keymap_entry_free()

Parameters

self

the struct to copy

 

dest

a unused struct. Use kkc_keymap_entry_destroy() to free the content.

 

kkc_keymap_entry_destroy ()

void
kkc_keymap_entry_destroy (KkcKeymapEntry *self);

Frees the content of the struct pointed by self .

See also: kkc_keymap_entry_dup(), kkc_keymap_entry_copy(), kkc_keymap_entry_free()

Parameters

self

the struct to destroy

 

Types and Values

KKC_TYPE_KEYMAP

#define KKC_TYPE_KEYMAP (kkc_keymap_get_type ())

The type for KkcKeymap.


struct KkcKeymap

struct KkcKeymap;

Object representing a keymap.


struct KkcKeymapClass

struct KkcKeymapClass {
	GObjectClass parent_class;
};

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

Members


struct KkcKeymapEntry

struct KkcKeymapEntry {
	KkcKeyEvent* key;
	gchar* command;
};

Property Details

The “parent” property

  “parent”                   KkcKeymap *

Parent keymap.

Flags: Read / Write