Back to index

im-sdk  12.3.91
Functions | Variables
le_session.c File Reference
#include <stdio.h>
#include "le_info.h"
#include "le_session.h"
#include "le_desktop.h"
#include "wtt_isc.h"
#include "encode.h"

Go to the source code of this file.

Functions

LeDesktopContextRecle_session_get_desktop_context (iml_session_t *s)
LeSessionContextRecle_session_get_session_context (iml_session_t *s)
LeResult le_session_set_focus_out (iml_session_t *s)
LeResult le_session_set_focus_in (iml_session_t *s)
LeSessionContextRecle_session_context_new ()
LeResult le_session_context_destroy (LeSessionContextRec *le_session_context)
LeResult le_session_context_print (LeSessionContextRec *le_session_context)
LeSessionContextRecle_session_create (iml_session_t *s)
LeResult le_session_destroy (iml_session_t *s)
IMTextle_session_reset (iml_session_t *s)
ConversionStatus le_session_get_conversion_status (iml_session_t *s)
LeResult le_session_set_conversion_status (iml_session_t *s, ConversionStatus conversion_status)
LeResult le_session_toggle_conversion_status (iml_session_t *s)
LeResult le_session_set_as_desktop_current_session (iml_session_t *s)
int le_session_get_isc_mode (iml_session_t *s)
int le_session_save_isc_mode (iml_session_t *s, int current_input_mode_id)
int le_session_get_keyboard_mode (iml_session_t *s)
int le_session_save_keyboard_mode (iml_session_t *s, int current_keyboard_id)
int le_session_get_previous_char (iml_session_t *s)
int le_session_save_previous_char (iml_session_t *s, char ch)

Variables

LeInfoRecle_info

Function Documentation

Definition at line 36 of file le_session.c.

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

    free((char *) le_session_context);

    return (LE_OK);
}

Definition at line 20 of file le_session.c.

{
    LeSessionContextRec *le_session_context = NULL;

    le_session_context =
       (LeSessionContextRec *) calloc(1, sizeof(LeSessionContextRec));
    if (le_session_context == NULL)
       return (NULL);

    le_session_context->current_conversion_status = CONVERSION_OFF;
    le_session_context->current_input_mode_id = WTT_ISC0;
    le_session_context->current_keyboard_id = 0;

    return (le_session_context);
}

Definition at line 47 of file le_session.c.

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

    return (LE_OK);
}

Definition at line 58 of file le_session.c.

{
    LeDesktopContextRec *le_desktop_context = NULL;
    LeSessionContextRec *le_session_context = NULL;
    int default_input_mode_id;
    int default_keyboard_id;
    int default_conversion_status;

    le_session_context = (LeSessionContextRec *) le_session_context_new();
    if (le_session_context == NULL)
       return (NULL);

    le_desktop_context =
       (LeDesktopContextRec *) le_session_get_desktop_context(s);
    default_input_mode_id =
       le_desktop_context_get_default_input_mode_id(le_desktop_context);
    default_keyboard_id =
       le_desktop_context_get_default_keyboard_id(le_desktop_context);
    default_conversion_status =
       le_desktop_context_get_default_conversion_status
       (le_desktop_context);

    le_session_context->current_input_mode_id = default_input_mode_id;
    le_session_context->current_keyboard_id = default_keyboard_id;
    le_session_context->current_conversion_status =
       default_conversion_status;

    le_session_context->s = s;

    s->specific_data = (void *) le_session_context;

    return (le_session_context);
}

Here is the call graph for this function:

Definition at line 92 of file le_session.c.

{
    DEBUG_printf("le_session_destroy: s: 0x%x\n", s);

    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);

    if (le_session_context != NULL) {
       le_session_context_destroy(le_session_context);
    }

    return (LE_OK);
}

Here is the call graph for this function:

Definition at line 148 of file le_session.c.

{
    LeSessionContextRec *le_session_context = NULL;

    le_session_context = le_session_get_session_context(s);
    if (le_session_context == NULL)
       return (CONVERSION_OFF);

    return (le_session_context->current_conversion_status);
}

Here is the call graph for this function:

Definition at line 215 of file le_session.c.

{
    LeDesktopContextRec *le_desktop_context =
       (LeDesktopContextRec *) le_session_get_desktop_context(s);
    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);
    int current_input_mode_id;

    current_input_mode_id = le_session_context->current_input_mode_id;

    if (current_input_mode_id < 0
       || current_input_mode_id >= WTT_ISC_MODES_NUM)
       current_input_mode_id = le_desktop_context->default_input_mode_id;

    return (current_input_mode_id);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 244 of file le_session.c.

{
    LeDesktopContextRec *le_desktop_context =
       (LeDesktopContextRec *) le_session_get_desktop_context(s);
    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);
    int current_keyboard_id;

    current_keyboard_id = le_session_context->current_keyboard_id;

    if (current_keyboard_id < 0
       || current_keyboard_id >= le_info->keymap_list->nNum_Keymaps)
       current_keyboard_id = le_desktop_context->default_keyboard_id;

    return (current_keyboard_id);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 276 of file le_session.c.

{
    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);
    return (le_session_context->char_previous);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 130 of file le_session.c.

{
    return ((IMText *) NULL);
}
int le_session_save_isc_mode ( iml_session_t s,
int  current_input_mode_id 
)

Definition at line 232 of file le_session.c.

{
    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);

    if (current_input_mode_id < 0
       || current_input_mode_id >= WTT_ISC_MODES_NUM)
       current_input_mode_id = WTT_ISC0;

    le_session_context->current_input_mode_id = current_input_mode_id;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int le_session_save_keyboard_mode ( iml_session_t s,
int  current_keyboard_id 
)

Definition at line 261 of file le_session.c.

{
    LeDesktopContextRec *le_desktop_context =
       (LeDesktopContextRec *) le_session_get_desktop_context(s);
    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);

    if (current_keyboard_id < 0
       || current_keyboard_id >= le_info->keymap_list->nNum_Keymaps)
       current_keyboard_id = le_desktop_context->default_keyboard_id;

    le_session_context->current_keyboard_id = current_keyboard_id;
}

Here is the call graph for this function:

int le_session_save_previous_char ( iml_session_t s,
char  ch 
)

Definition at line 283 of file le_session.c.

{
    LeSessionContextRec *le_session_context =
       le_session_get_session_context(s);
    le_session_context->char_previous = ch;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 204 of file le_session.c.

{
    LeDesktopContextRec *le_desktop_context = NULL;

    le_desktop_context =
       (LeDesktopContextRec *) le_session_get_desktop_context(s);
    le_desktop_context_set_current_session(le_desktop_context, s);

    return (LE_OK);
}

Here is the call graph for this function:

Definition at line 159 of file le_session.c.

{
    LeSessionContextRec *le_session_context = NULL;

    le_session_context = le_session_get_session_context(s);
    if (le_session_context == NULL)
       return (LE_FAIL);

    if (conversion_status == CONVERSION_OFF) {
       le_status_draw(s, CONVERSION_OFF);
       le_iml_conversion_off(s);
    } else {
       le_iml_conversion_on(s);
       le_status_draw(s, CONVERSION_ON);
    }

    le_session_context->current_conversion_status = conversion_status;

    return (LE_OK);
}

Here is the call graph for this function:

Definition at line 182 of file le_session.c.

{
    LeSessionContextRec *le_session_context = NULL;
    ConversionStatus conversion_status;
    LeResult le_result;

    le_session_context = le_session_get_session_context(s);
    if (le_session_context == NULL)
       return (LE_FAIL);

    conversion_status = le_session_context->current_conversion_status;
    DEBUG_printf("le_session_toggle_conversion_status: %d\n",
               ~conversion_status);
    if (conversion_status == CONVERSION_OFF) {
       le_result = le_session_set_conversion_status(s, CONVERSION_ON);
    } else {
       le_result = le_session_set_conversion_status(s, CONVERSION_OFF);
    }

    return (le_result);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 39 of file le_interface.c.