1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */ 2 /* 3 * nimf-xim-ic.h 4 * This file is part of Nimf. 5 * 6 * Copyright (C) 2015-2019 Hodong Kim <cogniti@gmail.com> 7 * 8 * Nimf is free software: you can redistribute it and/or modify it 9 * under the terms of the GNU Lesser General Public License as published 10 * by the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * Nimf is distributed in the hope that it will be useful, but 14 * WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 * See the GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License 19 * along with this program; If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef __NIMF_XIM_IC_H__ 23 #define __NIMF_XIM_IC_H__ 24 25 #include <glib-object.h> 26 #include "nimf.h" 27 #include "IMdkit/Xi18n.h" 28 #include "nimf-xim.h" 29 30 G_BEGIN_DECLS 31 32 #define NIMF_TYPE_XIM_IC (nimf_xim_ic_get_type ()) 33 #define NIMF_XIM_IC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NIMF_TYPE_XIM_IC, NimfXimIC)) 34 #define NIMF_XIM_IC_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), NIMF_TYPE_XIM_IC, NimfXimICClass)) 35 #define NIMF_IS_XIM_IC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NIMF_TYPE_XIM_IC)) 36 #define NIMF_IS_XIM_IC_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), NIMF_TYPE_XIM_IC)) 37 #define NIMF_XIM_IC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NIMF_TYPE_XIM_IC, NimfXimICClass)) 38 39 typedef struct _NimfXim NimfXim; 40 typedef struct _NimfXimIC NimfXimIC; 41 typedef struct _NimfXimICClass NimfXimICClass; 42 43 struct _NimfXimICClass 44 { 45 NimfServiceICClass parent_class; 46 }; 47 48 struct _NimfXimIC 49 { 50 NimfServiceIC parent_instance; 51 guint16 connect_id; 52 guint16 icid; 53 gint prev_preedit_length; 54 CARD32 input_style; 55 Window client_window; 56 Window focus_window; 57 NimfXim *xim; 58 }; 59 60 GType nimf_xim_ic_get_type (void) G_GNUC_CONST; 61 NimfXimIC *nimf_xim_ic_new (NimfXim *xim, 62 guint16 connect_id, 63 guint16 icid); 64 void nimf_xim_ic_set_cursor_location (NimfXimIC *xic, 65 gint x, 66 gint y); 67 68 G_END_DECLS 69 70 #endif /* __NIMF_XIM_IC_H__ */ 71 72