From 2a06e638fe8d7b7d21978a447795bab7b180ad6b Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Mon, 23 May 2016 21:08:13 +0900 Subject: Add docs from existing APIs. It also add an interface: efl_input_panel.eo --- src/lib/efl/interfaces/efl_cnp.eo | 23 +++-- src/lib/efl/interfaces/efl_input_panel.eo | 136 ++++++++++++++++++++++++++ src/lib/efl/interfaces/efl_text_cursor.eo | 74 ++++++++------ src/lib/efl/interfaces/efl_text_properties.eo | 48 +++------ src/lib/efl/interfaces/efl_text_selection.eo | 41 ++++---- 5 files changed, 232 insertions(+), 90 deletions(-) create mode 100644 src/lib/efl/interfaces/efl_input_panel.eo diff --git a/src/lib/efl/interfaces/efl_cnp.eo b/src/lib/efl/interfaces/efl_cnp.eo index 709491cc5b..7089648072 100644 --- a/src/lib/efl/interfaces/efl_cnp.eo +++ b/src/lib/efl/interfaces/efl_cnp.eo @@ -8,26 +8,33 @@ enum Efl.Cnp.Mode interface Efl.Cnp { methods { @property mode { - set { - [[TODO + [[Control pasting of text and images for the widget. + + Normally the entry allows both text and images to be pasted. + By setting cnp_mode to be #EFL_CNP_MODE_NO_IMAGE, this prevents images from being copy or past. + By setting cnp_mode to be #EFL_CNP_MODE_PLAINTEXT, this remove all tags in text . + + Note: This only changes the behaviour of text. ]] + set { } get { - [[TODO - ]] } values { - mode: Efl.Cnp.Mode; [[TODO]] + mode: Efl.Cnp.Mode; [[One of #Efl_Cnp_Mode: #EFL_CNP_MODE_MARKUP, #EFL_CNP_MODE_NO_IMAGE, #EFL_CNP_MODE_PLAINTEXT.]] } } copy { - return: const (char)*; [[TODO]] + [[This executes a "copy" action on the text of the object.]] + return: const (char)*; [[Returns copied text]] } cut { - return: const (char)*; [[TODO]] + [[This executes a "cut" action on the text of the object.]] + return: const (char)*; [[Returns cutted text]] } paste { - return: const (char)*; [[TODO]] + [[This executes a "paste" action on the text of the object.]] + return: const (char)*; [[Returns pasted text]] } } } diff --git a/src/lib/efl/interfaces/efl_input_panel.eo b/src/lib/efl/interfaces/efl_input_panel.eo new file mode 100644 index 0000000000..abacfb54c2 --- /dev/null +++ b/src/lib/efl/interfaces/efl_input_panel.eo @@ -0,0 +1,136 @@ +enum Efl.Input_Panel.Layout +{ + normal = 0, + number, + email, + url, + phonenumber, + ip, + month, + numberonly, + invalid, + hex, + terminal, + password, + datetime, + emoticon +} + +enum Efl.Input_Panel.Lang +{ + automatic = 0, + alphabet +} + +enum Efl.Input_Panel.Return.Key.Type +{ + default = 0, + done, + go, + join, + login, + next, + search, + send, + signin +} + +interface Efl.Input_Panel { + methods { + @property layout { + set { + [[Set the input panel layout.]] + } + get { + [[Get the input panel layout.]] + } + values { + layout: Efl.Input_Panel.Layout(Efl.Input_Panel.Layout.invalid); [[layout type.]] + } + } + @property visible { + [[Controls visiblity of the input panel. + ]] + set { + } + get { + } + values { + visible: bool; [[If visible is true, the input panel will be shown. If visible is false, the input panel will be hidden.]] + } + } + @property language { + set { + [[Set the language mode of the input panel. + + This API can be used if you want to show the alphabet keyboard mode. + ]] + } + get { + [[Get the language mode of the input panel. + ]] + } + values { + language: Efl.Input_Panel.Lang; [[language to be set to the input panel.]] + } + } + @property return_key_type { + set { + [[Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel. + + An input panel displays the string or icon associated with this type. + ]] + } + get { + [[Get the "return" key type. + ]] + } + values { + type: Efl.Input_Panel.Return.Key.Type; [[The type of "return" key on the input panel.]] + } + } + @property return_key_disabled { + set { + [[Set the return key on the input panel to be disabled. + ]] + } + get { + [[Get whether the return key on the input panel should be disabled or not. + ]] + } + values { + disabled: bool; [[The state to put in in: $true for + disabled, $false for enabled.]] + } + } + @property return_key_autoenabled { + [[Set whether the return key on the input panel is disabled automatically when there is no text. + + If $enabled is $true, The return key on input panel is disabled when there is no text. + The return key on the input panel is automatically enabled when there is text. + The default value is $false. + ]] + set { + } + get { + } + values { + enabled: bool; [[If $enabled is true, the return key is automatically disabled when there is no text.]] + } + } + @property show_on_demand { + set { + [[Set the attribute to show the input panel in case of only an user's explicit Mouse Up event. + It doesn't request to show the input panel even though it has focus. + ]] + } + get { + [[Get the attribute to show the input panel in case of only an user's explicit Mouse Up event. + ]] + } + values { + on_demand: bool; [[If true, the input panel will be shown in case of only Mouse up event.]] + } + } + } +} diff --git a/src/lib/efl/interfaces/efl_text_cursor.eo b/src/lib/efl/interfaces/efl_text_cursor.eo index 1b6bd6f17a..82aca87888 100644 --- a/src/lib/efl/interfaces/efl_text_cursor.eo +++ b/src/lib/efl/interfaces/efl_text_cursor.eo @@ -1,68 +1,86 @@ +enum Efl.Text.Cursor.Type +{ + under = 0, + before +} + interface Efl.Text.Cursor { methods { + @property type { + [[Contols cursor type. It may change the cursor's geometry + according to cursor type. + ]] + set { + } + get { + } + values { + type: Efl.Text.Cursor.Type; [[The cursor's type]] + } + } @property position { set { - [[TODO + [[Set the cursor pos. ]] } get { - [[TODO + [[Return the current cursor pos. ]] } values { - position: int; [[TODO]] + position: int; [[The cursor's position]] } } @property geometry { get { - [[TODO + [[Returns the geometry of the cursor. ]] } values { - x: int; [[TODO]] - y: int; [[TODO]] - w: int; [[TODO]] - h: int; [[TODO]] + x: int; [[Cursor X position]] + y: int; [[Cursor Y position]] + w: int; [[Cursor width]] + h: int; [[Cursor height]] } } @property bidi { get { - [[TODO + [[Returns the direction of the cursor. ]] } values { - bidi: int; [[TODO]] + bidi: Efl.BiDi.Direction; [[the diretion of the cursor]] } } - first { - [[TODO + move_begin { + [[Move the cursor to the beginning of text. ]] - return: bool; [[TODO]] + return: bool; [[If the cursor is moved to the beginning of text, it returns true]] } - last { - [[TODO + move_end { + [[Move the cursor to the end of text. ]] - return: bool; [[TODO]] + return: bool; [[If the cursor is moved to the end of text, it returns true]] } - next { - [[TODO + move_next { + [[Move the cursor to the next position of text. ]] - return: bool; [[TODO]] + return: bool; [[If the cursor is moved to the next position of text, it returns true]] } - prev { - [[TODO + move_prev { + [[Move the cursor to the previous position of text. ]] - return: bool; [[TODO]] + return: bool; [[If the cursor is moved to the previous position of text, it returns true]] } - up { - [[TODO + move_up { + [[Move the cursor to the above line of text. ]] - return: bool; [[TODO]] + return: bool; [[If the cursor is moved to the above line of text, it returns true]] } - down { - [[TODO + move_down { + [[Move the cursor to the below line of text. ]] - return: bool; [[TODO]] + return: bool; [[If the cursor is moved to the below line of text, it returns true]]] } } } diff --git a/src/lib/efl/interfaces/efl_text_properties.eo b/src/lib/efl/interfaces/efl_text_properties.eo index abe1151451..9424ed5003 100644 --- a/src/lib/efl/interfaces/efl_text_properties.eo +++ b/src/lib/efl/interfaces/efl_text_properties.eo @@ -8,7 +8,7 @@ enum Efl.Text.Properties.Ellipsis end } -enum Efl.Text.Properties.Horizontal.Alignment +enum Efl.Text.Properties.Horizontal_Alignment { default = 0, left, @@ -16,7 +16,7 @@ enum Efl.Text.Properties.Horizontal.Alignment right } -enum Efl.Text.Properties.Vertical.Alignment +enum Efl.Text.Properties.Vertical_Alignment { default = 0, top, @@ -24,7 +24,7 @@ enum Efl.Text.Properties.Vertical.Alignment bottom } -enum Efl.Text.Properties.Wrap.Mode +enum Efl.Text.Properties.Wrap_Mode { none = 0, char, @@ -87,64 +87,48 @@ interface Efl.Text.Properties { } } @property ellipsis { + [[Controls the ellipsis for the text object.]] set { - [[TODO - ]] } get { - [[TODO - ]] } values { - ellipsis: Efl.Text.Properties.Ellipsis; [[TODO]] + ellipsis: Efl.Text.Properties.Ellipsis; [[The ellipsis. See @Efl.Text.Properties.Ellipsis]] } } @property horizontal_alignment { + [[Controls horizontal alignment for text.]] set { - [[TODO - ]] } get { - [[TODO - ]] } values { - align: Efl.Text.Properties.Horizontal.Alignment; [[TODO]] + align: Efl.Text.Properties.Horizontal_Alignment; [[The horizontal alignment. See @Efl.Text.Properties.Horizontal_Alignment]] } } @property vertical_alignment { + [[Controls vertical alignment for text.]] set { - [[TODO - ]] } get { - [[TODO - ]] } values { - align: Efl.Text.Properties.Vertical.Alignment; [[TODO]] + align: Efl.Text.Properties.Vertical_Alignment; [[The vertical alignment. See @Efl.Text.Properties.Vertical_Alignment]] } } @property wrap_mode { + [[Controls wrap mode. This tells how the text will be implicitly cut + into a new line (without inserting a line break or paragraph separator) + when it reaches the far edge of the object. + + Note that #EFL_TEXT_PROPERTIES_WRAP_MODE_NONE indicates single-line mode. + ]] set { - [[TODO - ]] } get { - [[TODO - ]] - } - values { - ellipsis: Efl.Text.Properties.Ellipsis; [[TODO]] - } - } - @property BiDi { - get { - [[TODO - ]] } values { - bidi: Efl.BiDi.Direction; [[TODO]] + ellipsis: Efl.Text.Properties.Wrap_Mode; [[The wrap mode to use. See @Efl.Text.Properties.Wrap_Mode for details on them.]] } } } diff --git a/src/lib/efl/interfaces/efl_text_selection.eo b/src/lib/efl/interfaces/efl_text_selection.eo index 1de9d793d1..87a70c5924 100644 --- a/src/lib/efl/interfaces/efl_text_selection.eo +++ b/src/lib/efl/interfaces/efl_text_selection.eo @@ -1,61 +1,58 @@ interface Efl.Text.Selection { methods { @property enable { + [[Enable or disable selection feature.]] set { - [[TODO - ]] } get { - [[TODO - ]] } values { - enable: bool; [[TODO]] + enable: bool; [[If $enable is true, the text selection is enabled.]] } } @property region { + [[This selects a region of text within the object. set { - [[TODO - ]] } get { - [[TODO - ]] } values { - start: int; [[TODO]] - end: int; [[TODO]] + start: int; [[The starting position.]] + end: int; [[The end position.]] } } @property handler_disabled { + [[This disabled the selection handlers.]] set { - [[TODO - ]] } get { - [[TODO - ]] } values { - disabled: bool; [[TODO]] + disabled: bool; [[If $true, the selection handlers are disabled.]] } } @property text { get { - [[TODO + [[Get any selected text within the object. + + If there's any selected text in the object, this function returns it as + a string in markup format. $null is returned if no selection exists or + if an error occurred. + + The returned value points to an internal string and should not be freed + or modified in any way. If the object is deleted or its + contents are changed, the returned pointer should be considered invalid. ]] } values { - text: const(char)*; [[TODO]] + text: const(char)*; } } all { - [[TODO - ]] + [[This selects all text within the object.]] } none { - [[TODO - ]] + [[This drops any existing text selection within the object.]] } } } -- cgit v1.2.1