Back to index

im-sdk  12.3.91
lexmlconf.h
Go to the documentation of this file.
00001 /*
00002 Copyright 1990-2001 Sun Microsystems, Inc. All Rights Reserved.
00003 
00004 Permission is hereby granted, free of charge, to any person obtaining a
00005 copy of this software and associated documentation files (the
00006 "Software"), to deal in the Software without restriction, including
00007 without limitation the rights to use, copy, modify, merge, publish,
00008 distribute, sublicense, and/or sell copies of the Software, and to
00009 permit persons to whom the Software is furnished to do so, subject to
00010 the following conditions: The above copyright notice and this
00011 permission notice shall be included in all copies or substantial
00012 portions of the Software.
00013 
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018 IN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
00019 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021 THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022 ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024 
00025 Except as contained in this notice, the names of The Open Group and/or
00026 Sun Microsystems, Inc. shall not be used in advertising or otherwise to
00027 promote the sale, use or other dealings in this Software without prior
00028 written authorization from The Open Group and/or Sun Microsystems,
00029 Inc., as applicable.
00030 
00031 
00032 X Window System is a trademark of The Open Group
00033 
00034 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
00035 logo, LBX, X Window System, and Xinerama are trademarks of the Open
00036 Group. All other trademarks and registered trademarks mentioned herein
00037 are the property of their respective owners. No right, title or
00038 interest in or to any trademark, service mark, logo or trade name of
00039 Sun Microsystems, Inc. or its licensors is granted.
00040 
00041 */
00042 #ifndef LE_XML_CONF_H
00043 #define LE_XML_CONF_H
00044 
00045 #include "SunIM.h"
00046 
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050 
00051 typedef struct _IIIMLEXMLConf             IIIMLEXMLConf;
00052 typedef struct _IIIMLEXMLConfPrivate      IIIMLEXMLConfPrivate;
00053 typedef struct _IIIMLEInfoList            IIIMLEInfoList;
00054 typedef struct _IIIMLEInfo         IIIMLEInfo;
00055 typedef struct _IIIMLELanguageList IIIMLELanguageList;
00056 typedef struct _HotKeyStruct              HotKeyStruct;
00057 typedef struct _HotKeyList              HotKeyList;
00058 
00059 struct _IIIMLEXMLConf {
00060        char                 *filename;
00061        IIIMLEXMLConfPrivate *priv;
00062 };
00063 struct _IIIMLEInfoList {
00064        IIIMLEInfo     *data;
00065        IIIMLEInfoList *next;
00066 };
00067 struct _IIIMLEInfo {
00068        char       *language;
00069        char       *lename;
00070 };
00071 struct _IIIMLELanguageList {
00072        char *language;
00073        struct _IIIMLELanguageList *next;
00074 };
00075 struct _HotKeyStruct {
00076        char *modifiers;
00077        char *key;
00078        int keycode;
00079        int modmask;
00080 };
00081 struct _HotKeyList {
00082        HotKeyStruct *hotkey;
00083        HotKeyList   *next;
00084 };
00085 
00086 
00087 void            iiim_log_init                   (const char    *name);
00088 void            iiim_log_debug_mode             (void);
00089 
00090 IIIMLEXMLConf  *iiim_le_xmlconf_new             (const char    *filename);
00091 void            iiim_le_xmlconf_free            (IIIMLEXMLConf *conf);
00092 int             iiim_le_xmlconf_load_file       (IIIMLEXMLConf *conf);
00093 int             iiim_le_xmlconf_load_with_nsio  (IIIMLEXMLConf *conf,
00094                                            iml_desktop_t *iml_desktop);
00095 int             iiim_le_xmlconf_save_file       (IIIMLEXMLConf *conf);
00096 int             iiim_le_xmlconf_is_empty_module (IIIMLEXMLConf *conf);
00097 int             iiim_le_xmlconf_append_module   (IIIMLEXMLConf *conf,
00098                                            const char    *modulename,
00099                                            const char    *language);
00100 int             iiim_le_xmlconf_prepend_module  (IIIMLEXMLConf *conf,
00101                                            const char    *modulename,
00102                                            const char    *language);
00103 int             iiim_le_xmlconf_remove_module   (IIIMLEXMLConf *conf,
00104                                            const char    *modulename,
00105                                            const char    *language);
00106 IIIMLEInfoList *iiim_le_xmlconf_get_le_info_list(IIIMLEXMLConf *conf,
00107                                            const char    *language);
00108 IIIMLELanguageList *iiim_le_xmlconf_get_lang_list(IIIMLEXMLConf *conf);
00109 int             iiim_le_xmlconf_is_empty_hotkey (IIIMLEXMLConf *conf);
00110 int             iiim_le_xmlconf_append_hotkey   (IIIMLEXMLConf *conf,
00111                                            HotKeyStruct  *hotkey,
00112                                            const char    *language);
00113 int             iiim_le_xmlconf_remove_hotkey   (IIIMLEXMLConf *conf,
00114                                            HotKeyStruct  *hotkey,
00115                                            const char    *language);
00116 int             iiim_le_xmlconf_clear_hotkey    (IIIMLEXMLConf *conf,
00117                                            const char    *language);
00118 HotKeyList     *iiim_le_xmlconf_get_hotkey_list (IIIMLEXMLConf *conf,
00119                                            const char    *language);
00120 HotKeyStruct   *iiim_le_hotkey_struct_new       (const char    *name,
00121                                            const char    *modifiers);
00122 void            iiim_le_hotkey_struct_free      (HotKeyStruct  *hotkey);
00123 HotKeyList     *iiim_le_hotkey_list_new         (HotKeyStruct  *hotkey);
00124 HotKeyList     *iiim_le_hotkey_list_add         (HotKeyList    *list,
00125                                            HotKeyStruct  *hotkey);
00126 HotKeyList     *iiim_le_hotkey_list_remove      (HotKeyList    *list,
00127                                            HotKeyStruct  *hotkey);
00128 HotKeyList     *iiim_le_hotkey_list_find        (HotKeyList    *list,
00129                                            HotKeyStruct  *hotkey);
00130 void            iiim_le_hotkey_list_free        (HotKeyList    *list);
00131 
00132 #ifdef __cplusplus
00133 }
00134 #endif
00135 
00136 #endif /* LE_XML_CONF_H */