summaryrefslogtreecommitdiff
path: root/meego/meego-im-defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'meego/meego-im-defs.h')
-rw-r--r--meego/meego-im-defs.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/meego/meego-im-defs.h b/meego/meego-im-defs.h
new file mode 100644
index 0000000..85443bc
--- /dev/null
+++ b/meego/meego-im-defs.h
@@ -0,0 +1,91 @@
+/* * This file partially from the meego-im-framework *
+ *
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * Contact: Nokia Corporation (directui@nokia.com)
+ *
+ * If you have questions regarding the use of this file, please contact
+ * Nokia at directui@nokia.com.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation
+ * and appearing in the file LICENSE.LGPL included in the packaging
+ * of this file.
+ */
+
+#ifndef MEEGO_IM_DEFS_H
+#define MEEGO_IM_DEFS_H
+
+#include <glib.h>
+
+enum MeegoImOrientationAngle {
+ MeegoImAngle0 = 0,
+ MeegoImAngle90 = 90,
+ MeegoImAngle180 = 180,
+ MeegoImAngle270 = 270
+};
+
+/*!
+ * This enum contains possible values for orientation of windows in the application.
+ *
+ * \sa OrientationAngle
+ */
+enum MeegoImOrientation {
+ MeegoImPortrait, //!< equal to either M::Angle90 or M::Angle270 orientation angles
+ MeegoImLandscape //!< equal to either M::Angle0 or M::Angle180 orientation angles
+};
+
+//! Content type for text entries. Used at least with MTextEdit
+enum MeegoImTextContentType {
+ //! all characters allowed
+ MeegoImFreeTextContentType,
+
+ //! only integer numbers allowed
+ MeegoImNumberContentType,
+
+ //! allows numbers and certain other characters used in phone numbers
+ MeegoImPhoneNumberContentType,
+
+ //! allows only characters permitted in email address
+ MeegoImEmailContentType,
+
+ //! allows only character permitted in URL address
+ MeegoImUrlContentType,
+
+ //! allows content with user defined format
+ MeegoImCustomContentType
+};
+
+enum MeegoImInputMethodMode {
+ //! Normal mode allows to use preedit and error correction
+ MeegoImInputMethodModeNormal,
+
+ //! Virtual keyboard sends QKeyEvent for every key press or release
+ MeegoImInputMethodModeDirect,
+
+ //! Used with proxy widget
+ MeegoImInputMethodModeProxy
+};
+
+typedef enum _MeegoImPreeditFace {
+ MeegoImPreeditDefault,
+ MeegoImPreeditNoCandidates,
+ MeegoImPreeditKeyPress //! Used for displaying the hwkbd key just pressed
+} MeegoImPreeditFace;
+
+typedef struct _MeegoImPreeditFormat {
+ int start;
+ int length;
+ MeegoImPreeditFace face;
+} MeegoImPreeditFormat;
+
+typedef struct _MeegoImKeyEvent
+{
+ gboolean release;
+ unsigned int state;
+ unsigned int keysym;
+ char *text;
+} MeegoImKeyEvent;
+
+#endif