clean up PYConfig.h/cc
[platform/upstream/ibus-libpinyin.git] / src / PYPPinyinEditor.h
1 /* vim:set et ts=4 sts=4:
2  *
3  * ibus-pinyin - The Chinese PinYin engine for IBus
4  *
5  * Copyright (c) 2011 Peng Wu <alexepico@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20  */
21 #ifndef __PY_LIB_PINYIN_PINYIN_EDITOR_H_
22 #define __PY_LIB_PINYIN_PINYIN_EDITOR_H_
23
24 #include "PYPPhoneticEditor.h"
25
26 namespace PY {
27
28 #define MAX_PINYIN_LEN 64
29
30 class Config;
31
32 class LibPinyinPinyinEditor : public LibPinyinPhoneticEditor {
33 public:
34     LibPinyinPinyinEditor (PinyinProperties & props, Config & config);
35
36
37 protected:
38     gboolean processPinyin (guint keyval, guint keycode, guint modifiers);
39     gboolean processNumber (guint keyval, guint keycode, guint modifiers);
40     gboolean processPunct (guint keyval, guint keycode, guint modifiers);
41     gboolean processFunctionKey (guint keyval, guint keycode, guint modifiers);
42
43     void commit ();
44
45     virtual void updateAuxiliaryText (void);
46     virtual void updateLookupTable (void);
47     virtual void updatePreeditText (void);
48
49     virtual gboolean processKeyEvent (guint keyval, guint keycode, guint modifiers);
50
51     virtual void updatePinyin (void) = 0;
52 };
53
54 };
55
56 #endif