src/hbcore/inputfw/hbinputdef.h
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 7 923ff622b8b9
child 21 4633027730f5
child 34 ed14f46c0e55
equal deleted inserted replaced
9:730c025d4b77 15:f378acbc9cfb
    61 Enumerates known keyboard types. Specific bits are reserved
    61 Enumerates known keyboard types. Specific bits are reserved
    62 for keyboard classes. For example all, qwerty based
    62 for keyboard classes. For example all, qwerty based
    63 keyboards have bit HbQwertyKeyboardMask set and all touch keypads have
    63 keyboards have bit HbQwertyKeyboardMask set and all touch keypads have
    64 bit HbTouchInputMask set.
    64 bit HbTouchInputMask set.
    65 */
    65 */
    66 enum HbKeyboardTypeFlag
    66 enum HbKeyboardTypeFlag {
    67 {
    67     HbKeyboardNone                          = 0x00000000,
    68     HbKeyboardNone          				= 0x00000000,
    68 
    69 
    69     HbKeyboard12Key                         = 0x00000001,       /**< Deprecated, use HbKeyboardHardwarePortrait instead. */
    70     HbKeyboard12Key         				= 0x00000001,                                          /**< Conventional phone keypad */
    70     HbKeyboardHardwarePortrait                          = HbKeyboard12Key,  /**< Hardware keyboard for portrait orientation. */
    71 
    71     HbKeyboardQwerty                        = 0x00000001 | HbQwertyKeyboardMask,  /**< Deprecated, use HbKeyboardHardwareLandcape instead */
    72     HbKeyboardQwerty        				= 0x00000001 | HbQwertyKeyboardMask,                   /**< Qwerty keyboard */
    72     HbKeyboardHardwareLandcape                          = HbKeyboardQwerty, /**< Hardware keyboard for landscape mode. */
    73  
    73     HbKeyboardVirtual12Key                  = 0x00000001 | HbTouchInputMask,    /**< Deprecated, use HbKeyboardTouchPortrait instead. */
    74     HbKeyboardVirtual12Key  				= 0x00000001 | HbTouchInputMask,                       /**< Touchscreen version of conventional phone keypad */
    74     HbKeyboardTouchPortrait                             = HbKeyboardVirtual12Key,           /**< Touch keyboard for portrait mode. */
    75     HbKeyboardVirtualQwerty 				= 0x00000002 | HbTouchInputMask| HbQwertyKeyboardMask, /**< Touchscreen version of qwerty keyboard */
    75     HbKeyboardVirtualQwerty                 = 0x00000002 | HbTouchInputMask | HbQwertyKeyboardMask, /**< Touchscreen version of qwerty keyboard */
    76     HbKeyboardSctPortrait   				= 0x00000003 | HbTouchInputMask,                       /**< Special character selection keypad for portrait view */
    76     HbKeyboardTouchLandscape                            = HbKeyboardVirtualQwerty, /**< Touch keyboard for landscape mode. */
    77     HbKeyboardSctLandscape  				= 0x00000004 | HbTouchInputMask| HbQwertyKeyboardMask, /**< Special character selection keypad for landscape view */
    77     HbKeyboardSctPortrait                   = 0x00000003 | HbTouchInputMask,                       /**< Special character selection keypad for portrait view */
    78     HbKeyboardHwr           				= 0x00000005 | HbTouchInputMask| HbHwrKeyboardMask,    /**< Hand writing recognition keypad */
    78     HbKeyboardSctLandscape                  = 0x00000004 | HbTouchInputMask | HbQwertyKeyboardMask, /**< Special character selection keypad for landscape view */
    79     HbKeyboardThaiStarSctPortrait   	                = 0x00000006 | HbTouchInputMask,                       /**< Special character selection keypad for star key in Thai portrait view */
    79     HbKeyboardHwr                           = 0x00000005 | HbTouchInputMask | HbHwrKeyboardMask,   /**< Hand writing recognition keypad */
    80     HbKeyboardThaiHashSctPortrait   	                = 0x00000007 | HbTouchInputMask                        /**< Special character selection keypad for hash key in Thai portrait view */
    80     HbKeyboardVirtual12KeyLabels            = 0x00000006 | HbTouchInputMask                        /**< Key labels for virtual 12 key keyboard */
    81 };
    81 };
    82 
    82 
    83 Q_DECLARE_FLAGS(HbKeyboardType, HbKeyboardTypeFlag)
    83 Q_DECLARE_FLAGS(HbKeyboardType, HbKeyboardTypeFlag)
    84 
    84 
    85 /*!
    85 /*!
    86 \enum HbInputModeType
    86 \enum HbInputModeType
    87 
    87 
    88 Enumerates known input modes. Specific bits are reserved
    88 Enumerates known input modes. Specific bits are reserved
    89 for classifying different input mode types. For example, all Chinese modes
    89 for classifying different input mode types. For example, all Chinese modes
    90 have bit HbChineseModeMask set and all Japanese modes have 
    90 have bit HbChineseModeMask set and all Japanese modes have
    91 bit HbJapaneseModeMask set. HbInputModeCustom is a special case.
    91 bit HbJapaneseModeMask set. HbInputModeCustom is a special case.
    92 That input mode never appears in standard input mode set, but it must
    92 That input mode never appears in standard input mode set, but it must
    93 be activated separately from UI. 
    93 be activated separately from UI.
    94 */
    94 */
    95 enum HbInputModeTypeFlag
    95 enum HbInputModeTypeFlag {
    96 {
       
    97     HbInputModeNone                    = 0x00000000,
    96     HbInputModeNone                    = 0x00000000,
    98 
    97 
    99     // Default mode
    98     // Default mode
   100     HbInputModeDefault                 = 0x00000001,                      /**< Default input mode. This may mean diffierent things for different languages. */
    99     HbInputModeDefault                 = 0x00000001,                      /**< Default input mode. This may mean diffierent things for different languages. */
   101 
   100 
   102     // Numeric input mode
   101     // Numeric input mode
   103     HbInputModeNumeric                 = 0x00000001 | HbNumericModeMask,  /**< Numeric input mode */
   102     HbInputModeNumeric                 = 0x00000001 | HbNumericModeMask,  /**< Numeric input mode */
   104 
   103 
   105     // Special modes for all languages
   104     // Special modes for all languages
   106     HbInputModeSpeechToText            = 0x00000500,                      /**< Speech-to-text input mode */ 
   105     HbInputModeSpeechToText            = 0x00000500,                      /**< Speech-to-text input mode */
   107 
   106 
   108     // Chinese modes
   107     // Chinese modes
   109     HbInputModePinyin                  = 0x00000001 | HbChineseModeMask,  /**< Chinese PinYin input */
   108     HbInputModePinyin                  = 0x00000001 | HbChineseModeMask,  /**< Chinese PinYin input */
   110     HbInputModeStroke                  = 0x00000002 | HbChineseModeMask,  /**< Chinese Stroke input */
   109     HbInputModeStroke                  = 0x00000002 | HbChineseModeMask,  /**< Chinese Stroke input */
   111     HbInputModeZhuyin                  = 0x00000003 | HbChineseModeMask,  /**< Chinese ZhuYin input */
   110     HbInputModeZhuyin                  = 0x00000003 | HbChineseModeMask,  /**< Chinese ZhuYin input */
   122     // Handwriting modes
   121     // Handwriting modes
   123     HbInputModeHwrLatin                = 0x00000001 | HbHwrModeMask,                       /**< Latin based hand writing recognition */
   122     HbInputModeHwrLatin                = 0x00000001 | HbHwrModeMask,                       /**< Latin based hand writing recognition */
   124     HbInputModeHwrLatinFull            = 0x00000002 | HbHwrModeMask,                       /**< Latin based hand writing recognition, full screen */
   123     HbInputModeHwrLatinFull            = 0x00000002 | HbHwrModeMask,                       /**< Latin based hand writing recognition, full screen */
   125     HbInputModeHwrChinese              = 0x00000003 | HbHwrModeMask | HbChineseModeMask,   /**< Chinese hand writing recognition */
   124     HbInputModeHwrChinese              = 0x00000003 | HbHwrModeMask | HbChineseModeMask,   /**< Chinese hand writing recognition */
   126     HbInputModeHwrChineseFull          = 0x00000004 | HbHwrModeMask | HbChineseModeMask,   /**< Chinese hand writing recognition, full screen */
   125     HbInputModeHwrChineseFull          = 0x00000004 | HbHwrModeMask | HbChineseModeMask,   /**< Chinese hand writing recognition, full screen */
   127           
   126 
   128     // Custom made mode that does not belong to any pre-existing category
   127     // Custom made mode that does not belong to any pre-existing category
   129     HbInputModeCustom                  = HbChineseModeMask - 1             /**< Custom input mode */
   128     HbInputModeCustom                  = HbChineseModeMask - 1             /**< Custom input mode */
   130 };
   129 };
   131 Q_DECLARE_FLAGS(HbInputModeType, HbInputModeTypeFlag)
   130 Q_DECLARE_FLAGS(HbInputModeType, HbInputModeTypeFlag)
   132 
   131 
   135 
   134 
   136 Enumerates supported key event modifiers. There are modifiers for
   135 Enumerates supported key event modifiers. There are modifiers for
   137 shift, fn and chr keys. If a modifier bit is set, then the corresponding key
   136 shift, fn and chr keys. If a modifier bit is set, then the corresponding key
   138 is pressed.
   137 is pressed.
   139 */
   138 */
   140 enum HbModifier
   139 enum HbModifier {
   141 {
       
   142     HbModifierNone         = 0x00000000,
   140     HbModifierNone         = 0x00000000,
   143     HbModifierShiftPressed = 0x00000001,     /**< Shift-key is pressed */
   141     HbModifierShiftPressed = 0x00000001,     /**< Shift-key is pressed */
   144     HbModifierChrPressed   = 0x00000002,     /**< Chr-key is pressed */
   142     HbModifierChrPressed   = 0x00000002,     /**< Chr-key is pressed */
   145     HbModifierFnPressed    = 0x00000004      /**< Fn-key is pressed */
   143     HbModifierFnPressed    = 0x00000004      /**< Fn-key is pressed */
   146 };
   144 };
   149 /*!
   147 /*!
   150 \enum HbKeyboardSettingFlags
   148 \enum HbKeyboardSettingFlags
   151 
   149 
   152 Enumerates keyboard setting flags.
   150 Enumerates keyboard setting flags.
   153 */
   151 */
   154 enum HbKeyboardSettingFlag
   152 enum HbKeyboardSettingFlag {
   155 {
       
   156     HbKeyboardSettingNone         = 0x00000000,
   153     HbKeyboardSettingNone         = 0x00000000,
   157     HbKeyboardSetting12key        = 0x00000001,
   154     HbKeyboardSetting12key        = 0x00000001,
   158     HbKeyboardSettingQwerty       = 0x00000010
   155     HbKeyboardSettingQwerty       = 0x00000010
   159 };
   156 };
   160 Q_DECLARE_FLAGS(HbKeyboardSettingFlags, HbKeyboardSettingFlag)
   157 Q_DECLARE_FLAGS(HbKeyboardSettingFlags, HbKeyboardSettingFlag)
   164 
   161 
   165 Enumerates supported text case states. HbTextCaseAutomatic is a state
   162 Enumerates supported text case states. HbTextCaseAutomatic is a state
   166 where the framework automatically tries to conclude when upper case
   163 where the framework automatically tries to conclude when upper case
   167 state is needed.
   164 state is needed.
   168 */
   165 */
   169 enum HbTextCase
   166 enum HbTextCase {
   170 {
       
   171     HbTextCaseNone,
   167     HbTextCaseNone,
   172     HbTextCaseLower,             /**< Lower text case. */
   168     HbTextCaseLower,             /**< Lower text case. */
   173     HbTextCaseUpper,             /**< Upper text case. */
   169     HbTextCaseUpper,             /**< Upper text case. */
   174     HbTextCaseAutomatic          /**< Automatic capital letters. */
   170     HbTextCaseAutomatic          /**< Automatic capital letters. */
   175 };
   171 };
   177 /*!
   173 /*!
   178 \enum HbFnState
   174 \enum HbFnState
   179 
   175 
   180 Enumerates possible states for Fn key.
   176 Enumerates possible states for Fn key.
   181 */
   177 */
   182 enum HbFnState
   178 enum HbFnState {
   183 {
       
   184     HbFnOff,    /**< Fn key inactive. */
   179     HbFnOff,    /**< Fn key inactive. */
   185     HbFnNext,   /**< Fn key active for the next keypress. */
   180     HbFnNext,   /**< Fn key active for the next keypress. */
   186     HbFnOn      /**< Fn key locked as active. */
   181     HbFnOn      /**< Fn key locked as active. */
   187 };
   182 };
   188 
   183 
   193 may declare a set of constraints that control its behaviour. Constraint
   188 may declare a set of constraints that control its behaviour. Constraint
   194 bits are set through editor interface class.
   189 bits are set through editor interface class.
   195 
   190 
   196 \sa HbEditorInterface
   191 \sa HbEditorInterface
   197 */
   192 */
   198 enum HbEditorConstraint
   193 enum HbEditorConstraint {
   199 {
       
   200     HbEditorConstraintNone                 = 0,
   194     HbEditorConstraintNone                 = 0,
   201     HbEditorConstraintAutoCompletingField  = 0x01,   /**< This is auto-completing editor. It remebers what has been typed previously to same editor class. */
   195     HbEditorConstraintAutoCompletingField  = 0x01,   /**< This is auto-completing editor. It remembers what has been typed previously to same editor class. */
   202     HbEditorConstraintIgnoreFocus          = 0x02,   /**< Editor rejects input framework focus. */
   196     HbEditorConstraintIgnoreFocus          = 0x02,   /**< Editor rejects input framework focus. */
   203     HbEditorConstraintFixedInputMode       = 0x04,   /**< Editor doesn't allow initial input mode to be changed. */
   197     HbEditorConstraintFixedInputMode       = 0x04,   /**< Editor doesn't allow initial input mode to be changed. */
   204     HbEditorConstraintLatinAlphabetOnly    = 0x08    /**< Editor allows only languages and input modes that produce latin alphabets. */
   198     HbEditorConstraintLatinAlphabetOnly    = 0x08    /**< Editor allows only languages and input modes that produce latin alphabets. */
   205 };
   199 };
   206 Q_DECLARE_FLAGS(HbEditorConstraints, HbEditorConstraint)
   200 Q_DECLARE_FLAGS(HbEditorConstraints, HbEditorConstraint)
       
   201 Q_DECLARE_OPERATORS_FOR_FLAGS(HbEditorConstraints)
   207 
   202 
   208 /*!
   203 /*!
   209 \enum HbInputDigitType
   204 \enum HbInputDigitType
   210 
   205 
   211 Enumerates known digit type settings.
   206 Enumerates known digit type settings.
   212 */
   207 */
   213 enum HbInputDigitType
   208 enum HbInputDigitType {
   214 {
       
   215     HbDigitTypeNone = 0,
   209     HbDigitTypeNone = 0,
   216     HbDigitTypeLatin,          /**< Latin digits in use */
   210     HbDigitTypeLatin,          /**< Latin digits in use */
   217     HbDigitTypeArabicIndic,    /**< Arabic indic digits in use */
   211     HbDigitTypeArabicIndic,    /**< Arabic indic digits in use */
   218     HbDigitTypeEasternArabic,  /**< Eastern arabic digits in use */
   212     HbDigitTypeEasternArabic,  /**< Eastern arabic digits in use */
   219     HbDigitTypeDevanagari      /**< Devanagari digits in use */
   213     HbDigitTypeDevanagari      /**< Devanagari digits in use */
   220 };
   214 };
   221 
   215 
   222 /*!
   216 /*!
   223 Enumerates operation modes for touch keypad. 
   217 Enumerates operation modes for touch keypad.
   224 */
   218 */
   225 enum HbKeypadMode{
   219 enum HbKeypadMode {
   226     EModeAbc,        /**< Display aplhanumeric keypad */
   220     EModeAbc,        /**< Display aplhanumeric keypad */
   227     EModeNumeric     /**< Display number mode keypad */ 
   221     EModeNumeric     /**< Display number mode keypad */
   228 };
   222 };
   229 
   223 
   230 /*!
   224 /*!
   231 Enumerates known editor classes. If this value is set through
   225 Enumerates known editor classes. If this value is set through
   232 HbEditorInterface, it will have an effect on some input functionality.
   226 HbEditorInterface, it will have an effect on some input functionality.
   233 */
   227 */
   234 enum HbInputEditorClass {
   228 enum HbInputEditorClass {
   235      HbInputEditorClassUnknown = 0,
   229     HbInputEditorClassUnknown = 0,
   236      HbInputEditorClassEmail,
   230     HbInputEditorClassEmail,
   237      HbInputEditorClassUrl,
   231     HbInputEditorClassUrl,
   238      HbInputEditorClassUsername,
   232     HbInputEditorClassUsername,
   239      HbInputEditorClassPassword,
   233     HbInputEditorClassPassword,
   240      HbInputEditorClassPhoneNumber,
   234     HbInputEditorClassPhoneNumber,
   241      HbInputEditorClassStreetAddress,
   235     HbInputEditorClassStreetAddress,
   242      HbInputEditorClassZipCode,
   236     HbInputEditorClassZipCode,
   243      HbInputEditorClassSIPAddress,
   237     HbInputEditorClassSIPAddress,
   244      HbInputEditorClassFirstName,
   238     HbInputEditorClassFirstName,
   245      HbInputEditorClassLastName,
   239     HbInputEditorClassLastName,
   246      HbInputEditorClassFullName,
   240     HbInputEditorClassFullName,
   247      HbInputEditorClassFaxNumber,
   241     HbInputEditorClassFaxNumber,
   248      HbInputEditorClassTitle,
   242     HbInputEditorClassTitle,
   249      HbInputEditorClassProfession,
   243     HbInputEditorClassProfession,
   250      HbInputEditorClassCity,
   244     HbInputEditorClassCity,
   251      HbInputEditorClassDestination,
   245     HbInputEditorClassDestination,
   252      HbInputEditorClassNetworkDomain,
   246     HbInputEditorClassNetworkDomain,
   253      HbInputEditorClassNetworkName,     
   247     HbInputEditorClassNetworkName,
   254 
   248 
   255      HbInputEditorClassLastItem          // Keep this last, but never use.
   249     HbInputEditorClassLastItem          // Keep this last, but never use.
   256 };
   250 };
   257 
   251 
   258 /*!
   252 /*!
   259 Enumerates primary candidate modes.
   253 Enumerates primary candidate modes.
   260 */
   254 */
   261 enum HbPrimaryCandidateMode{
   255 enum HbPrimaryCandidateMode {
   262     HbPrimaryCandidateModeBestPrediction,        /**< Display best prediction as the primary candidate */
   256     HbPrimaryCandidateModeBestPrediction,        /**< Display best prediction as the primary candidate */
   263     HbPrimaryCandidateModeExactTyping            /**< Display exact typing as the primary candidate */
   257     HbPrimaryCandidateModeExactTyping            /**< Display exact typing as the primary candidate */
   264 };
   258 };
   265 
   259 
   266 /*!
   260 /*!
   267 Enumerates typing correction levels.
   261 Enumerates typing correction levels.
   268 */
   262 */
   269 enum HbTypingCorrectionLevel{
   263 enum HbTypingCorrectionLevel {
   270     HbTypingCorrectionLevelLow,
   264     HbTypingCorrectionLevelLow,
   271     HbTypingCorrectionLevelMedium,
   265     HbTypingCorrectionLevelMedium,
   272     HbTypingCorrectionLevelHigh
   266     HbTypingCorrectionLevelHigh
   273 };
   267 };
   274 
   268