efl.input.text: add variation enums + remove @since word
authorAli Alzyod <ali198724@gmail.com>
Tue, 14 Jan 2020 01:42:06 +0000 (10:42 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 14 Jan 2020 21:25:54 +0000 (06:25 +0900)
Summary: efl.input.text: add variation enums + remove @since word

Reviewers: woohyun, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8541

Differential Revision: https://phab.enlightenment.org/D11066

src/lib/efl/interfaces/efl_input_text.eo
src/lib/elementary/efl_ui_internal_text_interactive.c

index 37d3acb..f563b6d 100644 (file)
@@ -15,15 +15,9 @@ enum @beta Efl.Input_Text.Panel_Layout_Type
    hex,         [[Hexadecimal layout.]]
    terminal,    [[Command-line terminal layout including esc, alt, ctrl key, so on (no auto-correct, no auto-capitalization).]]
    password,    [[Like normal, but no auto-correct, no auto-capitalization etc.]]
-   datetime,    [[Date and time layout
-
-                  @since 1.8]]
-   emoticon,    [[Emoticon layout
-
-                  @since 1.10]]
-   voice        [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.
-
-                  @since 1.19]]
+   datetime,    [[Date and time layout.]]
+   emoticon,    [[Emoticon layout.]]
+   voice        [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.]]
 }
 
 enum @beta Efl.Input_Text.Panel_Language_Type
@@ -57,9 +51,7 @@ enum @beta Efl.Input_Text.Panel_Return_Key_Type
    next,    [[Next.]]
    search,  [[Search string or magnifier icon.]]
    send,    [[Send.]]
-   signin   [[Sign-in
-
-              @since 1.8]]
+   signin   [[Sign-in.]]
 }
 
 enum @beta Efl.Input_Text.Panel_Return_Key_State
@@ -75,53 +67,48 @@ enum @beta Efl.Input_Text.Panel_Return_Key_State
 
 enum @beta Efl.Input_Text.Hints_Type
 {
-   [[Enumeration that defines the types of Input Hints.
-
-     @since 1.12
-   ]]
-   none                = 0,        [[No active hints
-
-                                     @since 1.12]]
-   auto_complete       = 1 << 0,   [[Suggest word auto completion
-
-                                     @since 1.12]]
-   sensitive_data      = 1 << 1,   [[Typed text should not be stored.
-
-                                     @since 1.12]]
-   autofill_credit_card_expiration_date   = 0x100, [[ Autofill hint for a credit card expiration date
-
-                                                      @since 1.21]]
-   autofill_credit_card_expiration_day    = 0x200, [[Autofill hint for a credit card expiration day
-
-                                                     @since 1.21]]
-   autofill_credit_card_expiration_month  = 0x300, [[ Autofill hint for a credit card expiration month
-
-                                                      @since 1.21]]
-   autofill_credit_card_expiration_year   = 0x400, [[ Autofill hint for a credit card expiration year
-
-                                                      @since 1.21]]
-   autofill_credit_card_number            = 0x500, [[ Autofill hint for a credit card number
-
-                                                      @since 1.21]]
-   autofill_email_address                 = 0x600, [[ Autofill hint for an email address
-
-                                                      @since 1.21]]
-   autofill_name                          = 0x700, [[ Autofill hint for a user's real name
+   [[Enumeration that defines the types of Input Hints.]]
+   none                = 0,        [[No active hints.]]
+   auto_complete       = 1 << 0,   [[Suggest word auto completion.]]
+   sensitive_data      = 1 << 1,   [[Typed text should not be stored.]]
+   autofill_credit_card_expiration_date   = 0x100, [[ Autofill hint for a credit card expiration date.]]
+   autofill_credit_card_expiration_day    = 0x200, [[Autofill hint for a credit card expiration day.]]
+   autofill_credit_card_expiration_month  = 0x300, [[ Autofill hint for a credit card expiration month.]]
+   autofill_credit_card_expiration_year   = 0x400, [[ Autofill hint for a credit card expiration year.]]
+   autofill_credit_card_number            = 0x500, [[ Autofill hint for a credit card number.]]
+   autofill_email_address                 = 0x600, [[ Autofill hint for an email address.]]
+   autofill_name                          = 0x700, [[ Autofill hint for a user's real name.]]
+   autofill_phone                         = 0x800, [[ Autofill hint for a phone number.]]
+   autofill_postal_address                = 0x900, [[ Autofill hint for a postal address.]]
+   autofill_postal_code                   = 0xA00, [[ Autofill hint for a postal code.]]
+   autofill_id                            = 0xB00  [[ Autofill hint for a user's ID.]]
+}
 
-                                                      @since 1.21]]
-   autofill_phone                         = 0x800, [[ Autofill hint for a phone number
+enum @beta Efl.Input_Text.Panel_Layout_Normal_Variation_Type
+{
+   [[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]]
+   normal          , [[The plain normal layout.]]
+   filename        , [[Filename layout. Symbols such as '/' should be disabled.]]
+   person_name     , [[The name of a person, @Efl.Input_Text.autocapitalization will be set to @Efl.Input_Text.Capitalize_Type.word.]]
+}
 
-                                                      @since 1.21]]
-   autofill_postal_address                = 0x900, [[ Autofill hint for a postal address
+enum @beta Efl.Input_Text.Panel_Layout_Numberonly_Variation_Type
+{
+   [[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]]
+   normal             , [[The plain normal number layout.]]
+   signed             , [[The number layout to allow a positive or negative sign at the start.]]
+   decimal            , [[The number layout to allow decimal point to provide fractional value.]]
+   signed_and_decimal , [[The number layout to allow decimal point and negative sign.]]
+}
 
-                                                      @since 1.21]]
-   autofill_postal_code                   = 0xA00, [[ Autofill hint for a postal code
+enum @beta Efl.Input_Text.Panel_Layout_Password_Variation_Type
+{
+   [[Enumeration for defining the types of @Efl.Input_Text.Panel_Layout_Type for normal variation.]]
+   normal          , [[The normal password layout.]]
+   numberonly      , [[The password layout to allow only number.]]
+}
 
-                                                      @since 1.21]]
-   autofill_id                            = 0xB00  [[ Autofill hint for a user's ID
 
-                                                      @since 1.21]]
-}
 
 interface @beta Efl.Input_Text {
    [[All the functionality relating to input hints
@@ -154,9 +141,10 @@ interface @beta Efl.Input_Text {
          }
       }
 
-      // FIXME: What is this?
       @property input_panel_layout_variation {
-         [[The input panel layout variation of the entry.]]
+         [[The input panel layout variation of the entry, this can be
+           @Efl.Input_Text.Panel_Layout_Normal_Variation_Type , @Efl.Input_Text.Panel_Layout_Numberonly_Variation_Type
+           or @Efl.Input_Text.Panel_Layout_Password_Variation_Type.]]
          set {
          }
          get {
index a5768cc..3851aa8 100644 (file)
@@ -2067,6 +2067,10 @@ _efl_ui_internal_text_interactive_efl_input_text_input_panel_layout_variation_se
 #else
    (void)variation;
 #endif
+
+   if (sd->input_panel_layout == EFL_INPUT_TEXT_PANEL_LAYOUT_TYPE_NORMAL &&
+       variation == EFL_INPUT_TEXT_PANEL_LAYOUT_NORMAL_VARIATION_TYPE_PERSON_NAME)
+     efl_input_text_autocapitalization_set(obj, EFL_INPUT_TEXT_CAPITALIZE_TYPE_WORD);
 }
 
 EOLIAN static int