d58304cd925229aaf84ef372a2baeacfe1503310
[sdlhildon] / unicode.h
1 /* This file is part of SDL_him - SDL Hildon Input Method addon
2  * Copyright (C) 2010 Javier S. Pedro
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 3 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA or see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef UNICODE_H_
21 #define UNICODE_H_
22
23 /* Some unicode & utf8 helper functions */
24
25 #pragma GCC visibility push(hidden)
26
27 Uint32  dead_key_to_unicode_combining_character(KeySym keysym);
28 Uint32  combining_character_to_unicode(Uint32 combining);
29
30 #define NOT_COMPOSITE 0xFFFFU
31 Uint32  compose_unicode_characters(Uint32 first, Uint32 second);
32
33 int             unicode_to_utf8(Uint32 unichar, char * buf);
34
35 Uint32  keysym_to_unicode(KeySym keysym);
36 KeySym  unicode_to_keysym(Uint32 wc);
37
38 #pragma GCC visibility pop
39
40 #endif