X-Git-Url: http://git.maemo.org/git/?p=sdlhildon;a=blobdiff_plain;f=sdlhim%2Fsrc%2Funicode.h;fp=sdlhim%2Fsrc%2Funicode.h;h=d58304cd925229aaf84ef372a2baeacfe1503310;hp=0000000000000000000000000000000000000000;hb=4fed23fec414328a2135440d7a936e9b1604283f;hpb=effcd03c8ab831f04aee0b4ae836a5aef94da0fb diff --git a/sdlhim/src/unicode.h b/sdlhim/src/unicode.h new file mode 100644 index 0000000..d58304c --- /dev/null +++ b/sdlhim/src/unicode.h @@ -0,0 +1,40 @@ +/* This file is part of SDL_him - SDL Hildon Input Method addon + * Copyright (C) 2010 Javier S. Pedro + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA or see . + */ + +#ifndef UNICODE_H_ +#define UNICODE_H_ + +/* Some unicode & utf8 helper functions */ + +#pragma GCC visibility push(hidden) + +Uint32 dead_key_to_unicode_combining_character(KeySym keysym); +Uint32 combining_character_to_unicode(Uint32 combining); + +#define NOT_COMPOSITE 0xFFFFU +Uint32 compose_unicode_characters(Uint32 first, Uint32 second); + +int unicode_to_utf8(Uint32 unichar, char * buf); + +Uint32 keysym_to_unicode(KeySym keysym); +KeySym unicode_to_keysym(Uint32 wc); + +#pragma GCC visibility pop + +#endif