Back to index

im-sdk  12.3.91
Functions
le_keybinding.c File Reference
#include <stdio.h>
#include "le_info.h"

Go to the source code of this file.

Functions

ImmKeybindingRecimm_keybinding_new ()
LeResult imm_keybinding_destroy (ImmKeybindingRec *imm_keybinding)
int imm_keybinding_print (ImmKeybindingRec *imm_keybinding)
int imm_keybinding_set_value (ImmKeybindingRec *imm_keybinding, char *keycode_str, char *modifier_str, char *key_type_str)

Function Documentation

Definition at line 21 of file le_keybinding.c.

{
    if (imm_keybinding == NULL)
       return (LE_FAIL);

    free((char *) imm_keybinding);
    return (LE_OK);
}

Here is the caller graph for this function:

Definition at line 5 of file le_keybinding.c.

{
    ImmKeybindingRec *imm_keybinding = NULL;

    imm_keybinding =
       (ImmKeybindingRec *) calloc(1, sizeof(ImmKeybindingRec));
    if (imm_keybinding == NULL)
       return (NULL);

    imm_keybinding->keycode = 0;
    imm_keybinding->keychar = 0;
    imm_keybinding->modifier = 0;
    imm_keybinding->defined_type = 0;
    return (imm_keybinding);
}

Here is the caller graph for this function:

int imm_keybinding_print ( ImmKeybindingRec imm_keybinding)

Definition at line 30 of file le_keybinding.c.

{
#if DEBUG
    if (imm_keybinding == NULL)
       return (LE_FAIL);

    printf(" keycode: 0x%x  modifier: %d: defined_type: %d\n",
          imm_keybinding->keycode,
          imm_keybinding->modifier, imm_keybinding->defined_type);

    return (LE_OK);
#endif
}

Here is the caller graph for this function:

int imm_keybinding_set_value ( ImmKeybindingRec imm_keybinding,
char *  keycode_str,
char *  modifier_str,
char *  key_type_str 
)

Definition at line 44 of file le_keybinding.c.

{
    int keycode, keychar, modifier;
    int defined_type;

    if (imm_keybinding == NULL)
       return (LE_FAIL);
    if (!keycode_str || !*keycode_str)
       return (LE_FAIL);
    if (!modifier_str || !*modifier_str)
       return (LE_FAIL);
    if (!key_type_str || !*key_type_str)
       return (LE_FAIL);

    DEBUG_printf("keycode: %s, modifier: %s, type: %s\n", keycode_str,
               modifier_str, key_type_str);
    keycode = 0;
    keychar = 0;
    modifier = 0;
    defined_type = 0;

    imm_keybinding->keycode = keycode;
    imm_keybinding->keychar = keychar;
    imm_keybinding->modifier = modifier;
    imm_keybinding->defined_type = defined_type;

    return (LE_OK);
}

Here is the call graph for this function:

Here is the caller graph for this function: