1 /***************************************************************************
2  *   Copyright (C) 2010~2010 by CSSlayer                                   *
3  *   wengxt@gmail.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 /**
22  * @addtogroup Fcitx
23  * @{
24  */
25 
26 #ifndef _FCITX_PROFILE_H_
27 #define _FCITX_PROFILE_H_
28 
29 #include <fcitx-config/fcitx-config.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34     struct _FcitxInstance;
35 
36     /**
37      * @file profile.h
38      *
39      * define and function for ~/.config/fcitx/profile
40      */
41 
42     /**
43      * struct for ~/.config/fcitx/profile
44      **/
45     typedef struct _FcitxProfile {
46         /**
47          * derives from FcitxGenericConfig
48          **/
49         FcitxGenericConfig gconfig;
50         /**
51          * use remind mode
52          **/
53         boolean bUseRemind;
54 
55         /**
56          * current im index
57          **/
58         char* imName;
59 
60         /**
61          * use full width punc
62          **/
63         boolean bUseWidePunc;
64 
65         /**
66          * use full width char
67          **/
68         boolean bUseFullWidthChar;
69 
70         /**
71          * show preedit string in client or not
72          **/
73         boolean bUsePreedit;
74 
75         /**
76          * enabled im list
77          **/
78         char* imList;
79 
80     } FcitxProfile;
81 
82     /**
83      * load profile
84      *
85      * @param profile profile
86      * @param instance instance
87      *
88      * @return boolean loading successful
89      **/
90     boolean FcitxProfileLoad(FcitxProfile* profile, struct _FcitxInstance* instance);
91     /**
92      * save profile
93      *
94      * @param profile profile instance
95      * @return void
96      **/
97     void FcitxProfileSave(FcitxProfile* profile);
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif
104 
105 /**
106  * @}
107  */
108 // kate: indent-mode cstyle; space-indent on; indent-width 0;
109