1 /*************************************************************************** 2 * Copyright (C) 2002~2005 by Yuking * 3 * yuking_net@sohu.com * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 2 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * 19 ***************************************************************************/ 20 21 #ifndef _FCITX_H_ 22 #define _FCITX_H_ 23 24 /** 25 * @mainpage Fcitx 26 * fcitx is a lightweight Input Method Framework, written by C. 27 * It can be used under X11 to support international input. 28 * 29 */ 30 31 /** 32 * @defgroup Fcitx Fcitx 33 * 34 * All fcitx core related function, including addon process, mainloop, 35 * user interface, and all misc stuff needed by fcitx. 36 */ 37 38 39 /** 40 * @addtogroup Fcitx 41 * @{ 42 */ 43 44 /** 45 * @file fcitx.h 46 * @author CS Slayer <wengxt@gmail.com> 47 * some misc definition for Fcitx 48 */ 49 50 #ifdef __cplusplus 51 extern "C" { 52 #endif 53 54 #if defined(FCITX_HAVE_CONFIG_H) 55 #define _(msgid) gettext(msgid) 56 #define N_(msgid) (msgid) 57 #endif 58 59 /** export the symbol */ 60 #define FCITX_EXPORT_API __attribute__ ((visibility("default"))) 61 62 /** suppress the unused warning */ 63 #define FCITX_UNUSED(x) (void)(x) 64 65 /** fcitx addon ABI version, need to be used with addon */ 66 #define FCITX_ABI_VERSION 5 67 68 #define FCITX_DEFINE_PLUGIN(name, category, type) \ 69 FCITX_EXPORT_API int name##_ABI_VERSION = FCITX_ABI_VERSION; \ 70 FCITX_EXPORT_API type name##_##category 71 72 #if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301) 73 # define FCITX_DEPRECATED __attribute__((deprecated)) 74 #else /* not gcc >= 3.1 */ 75 # define FCITX_DEPRECATED 76 #endif 77 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif/*_FCITX_H_*/ 84 85 /** 86 * @} 87 */ 88 // kate: indent-mode cstyle; space-indent on; indent-width 0; 89