Back to index

im-sdk  12.3.91
Classes | Defines | Functions | Variables
SunIMConf2.c File Reference
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "SunIM.h"

Go to the source code of this file.

Classes

struct  PerSessionStruct

Defines

#define STATUS_LEN   17

Functions

static Bool if_sunimdefault_OpenIF (iml_if_t *)
static Bool if_sunimdefault_CloseIF (iml_if_t *)
static Bool if_sunimdefault_GetIFValues (iml_if_t *, IMArgList, int)
static Bool if_sunimdefault_SetIFValues (iml_if_t *, IMArgList, int)
static Bool if_sunimdefault_OpenDesktop (iml_desktop_t *, IMArgList, int)
static Bool if_sunimdefault_CloseDesktop (iml_desktop_t *)
static Bool if_sunimdefault_CreateSC (iml_session_t *, IMArgList, int)
static Bool if_sunimdefault_DestroySC (iml_session_t *)
static Bool if_sunimdefault_GetSCValues (iml_session_t *, IMArgList, int)
static Bool if_sunimdefault_SetSCValues (iml_session_t *, IMArgList, int)
static IMTextif_sunimdefault_ResetSC (iml_session_t *)
static void if_sunimdefault_SetSCFocus (iml_session_t *)
static void if_sunimdefault_UnsetSCFocus (iml_session_t *)
static void if_sunimdefault_SendEvent (iml_session_t *, IMInputEvent *ev)
static void turnoff_forwarding_event (iml_session_t *s)
static void turnon_forwarding_event (iml_session_t *s)
static void error_status_draw (iml_session_t *s)

Variables

if_methods_t sunim_default_methods
static UTFCHAR status_string []
static IMTextstatus_text = 0

Class Documentation

struct PerSessionStruct

Definition at line 80 of file SunIMConf2.c.

Class Members
int status_start

Define Documentation

#define STATUS_LEN   17

Definition at line 87 of file SunIMConf2.c.


Function Documentation

static void error_status_draw ( iml_session_t s) [static]

Definition at line 112 of file SunIMConf2.c.

{
    PerSessionStruct *p = (PerSessionStruct *) s->specific_data;
    iml_inst *lp;
    if (!p) {
        return;
    }
    if (p->status_start == 0) {
        lp = s->If->m->iml_make_status_start_inst(s);
        s->If->m->iml_execute(s, &lp);
    }
    if (status_text) {
        lp = s->If->m->iml_make_status_draw_inst(s, status_text);
        s->If->m->iml_execute(s, &lp);
    }
}

Here is the caller graph for this function:

static Bool if_sunimdefault_CloseDesktop ( iml_desktop_t desktop) [static]

Definition at line 193 of file SunIMConf2.c.

{
    return True;
}
static Bool if_sunimdefault_CloseIF ( iml_if_t If) [static]

Definition at line 154 of file SunIMConf2.c.

{
    free(status_text);
    return True;
}
static Bool if_sunimdefault_CreateSC ( iml_session_t s,
IMArgList  args,
int  num_args 
) [static]

Definition at line 201 of file SunIMConf2.c.

{
    PerSessionStruct *p = (PerSessionStruct*)calloc(1, sizeof(PerSessionStruct));
    p->status_start = 0;
    s->specific_data = (void*) p;
    return True;
}
static Bool if_sunimdefault_DestroySC ( iml_session_t s) [static]

Definition at line 214 of file SunIMConf2.c.

{
    PerSessionStruct *p = (PerSessionStruct *) s->specific_data;
    if (p) {
        free(p);
    }
    return True;
}
static Bool if_sunimdefault_GetIFValues ( iml_if_t If,
IMArgList  args,
int  num_args 
) [static]

Definition at line 163 of file SunIMConf2.c.

{
    return True;
}
static Bool if_sunimdefault_GetSCValues ( iml_session_t s,
IMArgList  args,
int  num_args 
) [static]

Definition at line 226 of file SunIMConf2.c.

{
    return True;
}
static Bool if_sunimdefault_OpenDesktop ( iml_desktop_t desktop,
IMArgList  args,
int  num_args 
) [static]

Definition at line 183 of file SunIMConf2.c.

{
    return True;
}
static Bool if_sunimdefault_OpenIF ( iml_if_t If) [static]

Definition at line 132 of file SunIMConf2.c.

{
    int i;
    status_text = (IMText *) calloc(1, sizeof(IMText));
    status_text->text.utf_chars = (UTFCHAR *) & status_string;
    status_text->char_length = STATUS_LEN;
    status_text->feedback = (IMFeedbackList *) calloc(1, sizeof(IMFeedback) * STATUS_LEN);
    for (i=0;i<STATUS_LEN;i++) {
        IMFeedbackList *list=&status_text->feedback[i];
        IMFeedback *feedback;
        list->count_feedbacks=1;
        list->feedbacks = (IMFeedback *) calloc(1, sizeof(IMFeedback) * status_text->feedback->count_feedbacks);
        feedback=&list->feedbacks[0];
        feedback->type=IM_DECORATION_FEEDBACK;
        feedback->value=0;
    }
    return True;
}
static IMText * if_sunimdefault_ResetSC ( iml_session_t s) [static]

Definition at line 254 of file SunIMConf2.c.

{
    turnoff_forwarding_event(s);
    return (IMText *) NULL;
}

Here is the call graph for this function:

static void if_sunimdefault_SendEvent ( iml_session_t s,
IMInputEvent ev 
) [static]

Definition at line 281 of file SunIMConf2.c.

{
    iml_inst *lp;
    IMKeyListEvent *keylist;
    
    if (ev->type == IM_EventKeyList) {
        keylist = (IMKeyListEvent *) ev;
        lp = s->If->m->iml_make_keypress_inst(s, (IMKeyEventStruct *) keylist->keylist);
        s->If->m->iml_execute(s, &lp);
    }
    
    turnoff_forwarding_event(s);
}

Here is the call graph for this function:

static Bool if_sunimdefault_SetIFValues ( iml_if_t If,
IMArgList  args,
int  num_args 
) [static]

Definition at line 173 of file SunIMConf2.c.

{
    return True;
}
static void if_sunimdefault_SetSCFocus ( iml_session_t s) [static]

Definition at line 263 of file SunIMConf2.c.

Here is the call graph for this function:

static Bool if_sunimdefault_SetSCValues ( iml_session_t s,
IMArgList  args,
int  num_args 
) [static]

Definition at line 236 of file SunIMConf2.c.

{
    int i;
    IMArg *p=args;
    for (i = 0; i < num_args; i++, p++) {
        switch (p->id) {
            case SC_TRIGGER_ON_NOTIFY:
                turnon_forwarding_event(s);
            }
    }
    return True;
}

Here is the call graph for this function:

static void if_sunimdefault_UnsetSCFocus ( iml_session_t s) [static]

Definition at line 272 of file SunIMConf2.c.

Here is the call graph for this function:

static void turnoff_forwarding_event ( iml_session_t s) [static]

Definition at line 92 of file SunIMConf2.c.

{
    iml_inst *lp;
    lp = s->If->m->iml_make_end_conversion_inst(s);
    s->If->m->iml_execute(s, &lp);
}

Here is the caller graph for this function:

static void turnon_forwarding_event ( iml_session_t s) [static]

Definition at line 102 of file SunIMConf2.c.

{
    iml_inst *lp;
    lp = s->If->m->iml_make_start_conversion_inst(s);
    s->If->m->iml_execute(s, &lp);
}

Here is the caller graph for this function:


Variable Documentation

UTFCHAR status_string[] [static]
Initial value:
{'[', 'N', 'o', ' ', 'I', 'M', ' ', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'e', 'd', ']'}

Definition at line 84 of file SunIMConf2.c.

IMText* status_text = 0 [static]

Definition at line 89 of file SunIMConf2.c.