From bfbf55700091bb6084b3cbe151a762816db0e3f0 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Wed, 11 Apr 2012 03:12:40 +0200 Subject: initial import --- meego/meego-im-defs.h | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 meego/meego-im-defs.h (limited to 'meego/meego-im-defs.h') 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 + +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 -- cgit v1.2.3