initial import for sdlhaa & sdlhim
[sdlhildon] / sdlhim / src / unicode.h
diff --git a/sdlhim/src/unicode.h b/sdlhim/src/unicode.h
new file mode 100644 (file)
index 0000000..d58304c
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+
+#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