include/unihan_property.h

Go to the documentation of this file.
00001 //
00002 // Unihan Input Method
00003 //
00004 // Copyright © 2002-2007 Sun Wah Linux Ltd.
00005 //
00006 //
00007 // This library is free software; you can redistribute it and/or modify
00008 // it under the terms of the GNU Lesser General Public License as
00009 // published by the Free Software Foundation; either version 2.1 of the
00010 // License, or (at your option) any later version.
00011 //
00012 // This library is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 // Lesser General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this program; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020 // USA
00021 //
00022 // $Id: unihan_property.h 757 2007-05-10 08:19:31Z roger $
00023 //
00024 
00025 #ifndef _UNIHAN_PROPERTY_H
00026 #define _UNIHAN_PROPERTY_H
00027 
00028 #if 0
00029 typedef enum _UnihanPropertyType {
00030         UNIHAN_PROPERTY_NONE = 0,
00031         UNIHAN_PROPERTY_RUNTIME = 1,
00032         UNIHAN_RPOPERTY_USER = 2
00033 } UnihanPropertyType;
00034 
00035 typedef enum {
00036         UNIHAN_RUNTIME_PROPERTY_UNSPEC = 0,     //set all following properties, and set them zero
00037         UNIHAN_RUNTIME_PROPERTY_FULL_HALF = 1,
00038         UNIHAN_RUNTIME_PROPERTY_PUNC_EN_CH = 2,
00039         UNIHAN_RUNTIME_PROPERTY_STATE_EN_CH = 3,
00040         UNIHAN_RUNTIME_PROPERTY_CHARSET = 4,
00041         UNIHAN_RUNTIME_PROPERTY_LOCALE = 5,
00042         UNIHAN_RUNTIME_PROPERTY_TCSC = 6,
00043         UNIHAN_RUNTIME_PROPERTY_SOFT_KB = 7,
00044         UNIHAN_RUNTIME_PROPERTY_MAX
00045 } UnihanRuntimePropertyType;
00046 
00047 typedef enum{
00048         UNIHAN_RUNTIME_PRO_HALF = 0,
00049         UNIHAN_RUNTIME_PRO_FULL = 1
00050 }RUNTIME_PRO_FULL_HALF;
00051 
00052 typedef enum{
00053         UNIHAN_RUNTIME_PRO_PUNC_EN = 0,
00054         UNIHAN_RUNTIME_PRO_PUNC_CH = 1
00055 }RUNTIME_PRO_PUNC_EN_CH;
00056 
00057 typedef enum{
00058         UNIHAN_RUNTIME_PRO_STATE_EN = 0,
00059         UNIHAN_RUNTIME_PRO_STATE_CH = 1
00060 }RUNTIME_PRO_STATE_EN_CH;
00061 
00062 typedef enum{
00063         UNIHAN_RUNTIME_PRO_NO_CONV = 0,
00064         UNIHAN_RUNTIME_PRO_TC_SC = 1,
00065         UNIHAN_RUNTIME_PRO_SC_TC = 2
00066 }RUNTIME_PRO_TCSC;
00067 
00068 typedef enum{
00069         UNIHAN_SOFTKB_CLOSE = 0,
00070         UNIHAN_SOFTKB_OPEN = 1
00071 }RUNTIME_PRO_SOFT_KB;
00072 
00073 
00074 typedef enum {
00075         UNIHAN_SOFTKB_UNSPEC = 0,
00076         UNIHAN_SOFTKB_US,
00077         UNIHAN_SOFTKB_SYMBOL,
00078         //Appending... ...
00079         UNIHAN_SOFTKB_MAX
00080 } UnihanSoftKBType;
00081 
00082 typedef struct _UnihanRuntimeProperty {
00083         UnihanRuntimePropertyType rt_type;
00084         int value;
00085         struct _rt_prop_name {
00086                 char *name_string;
00087                 char *charset;
00088                 char *language;
00089                 int nr_name;
00090         } name;
00091         struct rt_icon {
00092                 char *icon0;    //FALSE icon
00093                 char *icon1;    //TRUE icon
00094         } icon;
00095 } UnihanRuntimeProperty;
00096 
00097 typedef struct _UnihanUserProperty {
00098         void *priv_data;
00099         size_t size;
00100 } UnihanUserProperty;
00101 
00102 typedef struct _UnihanPropertyArgs UnihanPropertyArgs, *UnihanPropertyArgList;
00103 
00104 struct _UnihanPropertyArgs {
00105         UnihanPropertyType type;
00106         union __UnihanProperty {
00107                 UnihanRuntimeProperty rt_property;
00108                 UnihanUserProperty u_property;
00109         } unihan_proeprty;
00110         UnihanPropertyArgList next;
00111 };
00112 
00113 #endif
00114 
00115 #define UNIHAN_PROPERTY_ACTIVE   1
00116 #define UNIHAN_PROPERTY_VISIBLE  2
00117 
00162 typedef struct _UnihanProperty {
00163         const char *key;
00164         const char *label;
00165         const char *icon;
00166         const char *tip;
00167         int         state;
00168 } UnihanProperty;
00169 
00179 typedef struct _UnihanPropertyList {
00180     int           propertiesNum;
00181     UnihanProperty *properties;
00182 } UnihanPropertyList;
00183 
00184 #endif /* _UNIHAN_PROPERTY_H */
00185 
00186 // vi:ts=4:nowrap:cin:expandtab

Generated on Fri Sep 7 15:51:41 2007 for unihan-core-le by  doxygen 1.5.2