File: im_scim.h

package info (click to toggle)
mlterm 3.9.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,340 kB
  • sloc: ansic: 154,713; sh: 5,302; cpp: 2,953; objc: 2,776; java: 2,472; makefile: 2,445; perl: 1,674; xml: 44
file content (62 lines) | stat: -rw-r--r-- 1,647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* -*- c-basic-offset:2; tab-width:2; indent-tabs-mode:nil -*- */

#ifndef __IM_SCIM_H__
#define __IM_SCIM_H__

#ifdef __cplusplus
extern "C" {
#endif

/*
 * The header files of pobl must be included here, since it does not
 * supports c++.
 */
#include <pobl/bl_debug.h>  /* bl_*_printf() */
#include <pobl/bl_types.h> /* u_int */

#define CHAR_ATTR_UNDERLINE (1U)
#define CHAR_ATTR_REVERSE (1U << 1)
#define CHAR_ATTR_BOLD (1U << 2)

typedef void *im_scim_context_t;

/* callbacks */
typedef struct im_scim_callbacks {
  void (*commit)(void *, char *);
  void (*preedit_update)(void *, char *, int);
  void (*candidate_update)(void *, int, u_int, char **, int);
  void (*candidate_show)(void *);
  void (*candidate_hide)(void *);
  void (*im_changed)(void *, char *);

} im_scim_callbacks_t;

int im_scim_initialize(char *locale);
int im_scim_finalize(void);

im_scim_context_t im_scim_create_context(void *self, im_scim_callbacks_t *callbacks);

int im_scim_destroy_context(im_scim_context_t context);

int im_scim_is_on(im_scim_context_t context);
int im_scim_switch_mode(im_scim_context_t context);
int im_scim_key_event(im_scim_context_t context, KeySym ksym, XKeyEvent *event);

int im_scim_focused(im_scim_context_t context);
int im_scim_unfocused(im_scim_context_t context);

u_int im_scim_preedit_char_attr(im_scim_context_t context, u_int index);

int im_scim_get_panel_fd(void);
int im_scim_receive_panel_event(void);

u_int im_scim_get_number_of_factory(void);
char *im_scim_get_default_factory_name(char *locale);
char *im_scim_get_factory_name(int index);
char *im_scim_get_language(int index);

#ifdef __cplusplus
}
#endif

#endif