1 /* ImHangul - Gtk+ 2.0 Input Method Module for Hangul 2 * Copyright (C) 2002-2008 Choe Hwanjin 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 * Boston, MA 02111-1307, USA. 18 */ 19 20 #ifndef __GTK_IM_CONTEXT_HANGUL_H__ 21 #define __GTK_IM_CONTEXT_HANGUL_H__ 22 23 #include <hangul.h> 24 #include <gtk/gtk.h> 25 26 extern GType gtk_type_im_context_hangul; 27 28 #define GTK_TYPE_IM_CONTEXT_HANGUL (gtk_type_im_context_hangul) 29 #define GTK_IM_CONTEXT_HANGUL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT_HANGUL, GtkIMContextHangul)) 30 #define GTK_IS_IM_CONTEXT_HANGUL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IM_CONTEXT_HANGUL)) 31 32 typedef struct _GtkIMContextHangul GtkIMContextHangul; 33 typedef struct _GtkIMContextHangulClass GtkIMContextHangulClass; 34 typedef struct _Candidate Candidate; 35 typedef struct _Toplevel Toplevel; 36 37 typedef enum 38 { 39 IM_HANGUL_COMPOSER_2, 40 IM_HANGUL_COMPOSER_3, 41 } IMHangulComposerType; 42 43 struct _GtkIMContextHangul 44 { 45 GtkIMContext object; 46 47 /* default input module: simple */ 48 GtkIMContext *slave; 49 gboolean slave_preedit_started; 50 51 /* window */ 52 GdkWindow *client_window; 53 Toplevel *toplevel; 54 GdkRectangle cursor; 55 guint button_press_handler; 56 57 /* hangul ic */ 58 HangulInputContext* hic; 59 GString* preedit; 60 61 /* candidate data */ 62 Candidate *candidate; 63 GArray *candidate_string; 64 65 /* options */ 66 gboolean use_preedit : 1; 67 }; 68 69 struct _GtkIMContextHangulClass 70 { 71 GtkIMContextClass parent_class; 72 }; 73 74 void gtk_im_context_hangul_register_type (GTypeModule *type_module); 75 void im_hangul_init (void); 76 void im_hangul_finalize (void); 77 78 GtkIMContext *gtk_im_context_hangul_new (void); 79 80 /* configuration */ 81 void gtk_im_context_hangul_select_keyboard(GtkIMContextHangul *hcontext, 82 const char *keyboard); 83 84 #endif /* __GTK_IM_CONTEXT_HANGUL_H__ */ 85 86 /* vim: set sw=2 : */ 87