forked from enlightenment/efl
446 lines
16 KiB
Plaintext
446 lines
16 KiB
Plaintext
/* FIXME - Text object must stop using Context_Item_Clicked_Cb! */
|
|
/* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */
|
|
type @beta @extern Context_Item_Clicked_Cb: __undefined_type; [[Evas smart callback type]]
|
|
|
|
struct @beta Efl.Ui.Validate_Content_Info
|
|
{
|
|
[[Validate content information.]]
|
|
text: string; [[Validate content text]]
|
|
signal: string; [[Validate content signal]]
|
|
}
|
|
|
|
enum @beta Efl.Ui.Autocapital_Type
|
|
{
|
|
[[Autocapitalization Types.
|
|
Choose method of auto-capitalization.
|
|
]]
|
|
none, [[No auto-capitalization when typing.]]
|
|
word, [[Autocapitalize each word typed.]]
|
|
sentence, [[Autocapitalize the start of each sentence.]]
|
|
allcharacter [[Autocapitalize all letters.]]
|
|
}
|
|
|
|
enum @beta Efl.Ui.Input_Panel_Language_Type
|
|
{
|
|
[[Input panel (virtual keyboard) language modes.
|
|
]]
|
|
automatic, [[Automatic]]
|
|
alphabet [[Alphabet]]
|
|
}
|
|
|
|
|
|
enum @beta Efl.Ui.Input_Hints
|
|
{
|
|
[[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.]]
|
|
}
|
|
|
|
|
|
enum @beta Efl.Ui.Input_Panel_Layout
|
|
{
|
|
[[Input panel (virtual keyboard) layout types.
|
|
Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired.
|
|
]]
|
|
normal, [[Default layout.]]
|
|
number, [[Number layout.]]
|
|
email, [[Email layout.]]
|
|
url, [[URL layout.]]
|
|
phonenumber, [[Phone Number layout.]]
|
|
ip, [[IP layout.]]
|
|
month, [[Month layout.]]
|
|
numberonly, [[Number Only layout.]]
|
|
invalid, [[Never use this.]]
|
|
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.]]
|
|
emoticon, [[Emoticon layout.]]
|
|
voice [[Voice layout, but if the IME does not support voice layout, then normal layout will be shown.]]
|
|
}
|
|
|
|
enum @beta Efl.Ui.Input_Panel_Return_Key_Type
|
|
{
|
|
[["Return" Key types on the input panel (virtual keyboard).
|
|
]]
|
|
default, [[Default.]]
|
|
done, [[Done.]]
|
|
go, [[Go.]]
|
|
join, [[Join.]]
|
|
login, [[Login.]]
|
|
next, [[Next.]]
|
|
search, [[Search string or magnifier icon.]]
|
|
send, [[Send.]]
|
|
signin [[Sign-in.]]
|
|
}
|
|
enum @beta Efl.Ui.Icon_Type
|
|
{
|
|
[[Icon types.]]
|
|
none, [[Icon has no type set.]]
|
|
file, [[Icon is of type file.]]
|
|
standard [[Icon is of type standard.]]
|
|
}
|
|
|
|
class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickable,
|
|
Efl.Access.Text, Efl.Access.Editable.Text, Efl.File,
|
|
Efl.Ui.Text_Selectable
|
|
composites
|
|
Efl.Text_Interactive, Efl.Text_Markup
|
|
{
|
|
[[A flexible text widget which can be static (as a label) or editable by
|
|
the user (as a text entry). It provides all sorts of editing facilities
|
|
like automatic scrollbars, virtual keyboard, clipboard, configurable
|
|
context menus, password mode or autocapitalization, for example.]]
|
|
methods {
|
|
@property scrollable {
|
|
[[Enable or disable scrolling in the widget.
|
|
|
|
When scrolling is enabled scrollbars will appear if the text does
|
|
not fit the widget size.]]
|
|
set {}
|
|
get {}
|
|
values {
|
|
scroll: bool; [[$true to enable scrolling. Default is $false.]]
|
|
}
|
|
}
|
|
@property input_panel_show_on_demand {
|
|
[[The attribute to show the input panel in case of only a user's explicit Mouse Up event.
|
|
It doesn't request to show the input panel even though it has focus.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
ondemand: bool; [[If $true, the input panel will be shown in case of only Mouse up event.
|
|
(Focus event will be ignored.)
|
|
]]
|
|
}
|
|
}
|
|
@property context_menu_disabled {
|
|
[[This disables the entry's contextual (longpress) menu.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
disabled: bool; [[If $true, the menu is disabled.]]
|
|
}
|
|
}
|
|
@property cnp_mode {
|
|
/* FIXME: Efl.Ui.Selection_Format does not allow markup without images! */
|
|
[[Control pasting of text and images for the widget.
|
|
|
|
Normally the entry allows both text and images to be pasted.
|
|
|
|
Note: This only changes the behaviour of text.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
format: Efl.Ui.Selection_Format; [[Format for copy & paste.]]
|
|
}
|
|
}
|
|
@property input_panel_language {
|
|
[[The language mode of the input panel.
|
|
|
|
This API can be used if you want to show the alphabet keyboard mode.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
lang: Efl.Ui.Input_Panel_Language_Type; [[Language to be set to the input panel.]]
|
|
}
|
|
}
|
|
@property selection_handler_disabled {
|
|
[[This disables the entry's selection handlers.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
disabled: bool; [[If $true, the selection handlers are disabled.]]
|
|
}
|
|
}
|
|
@property input_panel_layout_variation {
|
|
[[Set the input panel layout variation of the entry
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
variation: int; [[Layout variation type.]]
|
|
}
|
|
}
|
|
@property autocapital_type {
|
|
[[Set the autocapitalization type on the immodule.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
autocapital_type: Efl.Ui.Autocapital_Type; [[The type of autocapitalization.]]
|
|
}
|
|
}
|
|
@property password_mode {
|
|
[[Sets the entry to password mode.
|
|
|
|
In password mode entries are implicitly single line and the display of
|
|
any text inside them is replaced with asterisks (*).
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
password: bool; [[If true, password mode is enabled.]]
|
|
}
|
|
}
|
|
@property input_panel_return_key_disabled {
|
|
[[Set the return key on the input panel to be disabled.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
disabled: bool; [[The state to put in in: $true for
|
|
disabled, $false for enabled.]]
|
|
}
|
|
}
|
|
@property prediction_allow {
|
|
[[Whether the entry should allow predictive text.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
prediction: bool; [[Whether the entry should allow predictive text.]]
|
|
}
|
|
}
|
|
@property input_hint {
|
|
[[Sets the input hint which allows input methods to fine-tune their behavior.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
hints: Efl.Ui.Input_Hints; [[Input hint.]]
|
|
}
|
|
}
|
|
@property input_panel_layout {
|
|
[[Set the input panel layout of the entry.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
layout: Efl.Ui.Input_Panel_Layout(Efl.Ui.Input_Panel_Layout.invalid); [[Layout type.]]
|
|
}
|
|
}
|
|
@property input_panel_return_key_type {
|
|
[[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.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
return_key_type: Efl.Ui.Input_Panel_Return_Key_Type; [[The type of "return" key on the input panel.]]
|
|
}
|
|
}
|
|
@property input_panel_enabled {
|
|
[[Sets the attribute to show the input panel automatically.]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
enabled: bool; [[If $true, the input panel is appeared when entry is clicked or has a focus.]]
|
|
}
|
|
}
|
|
@property input_panel_return_key_autoenabled {
|
|
[[Whether the return key on the input panel is disabled automatically when entry has no text.
|
|
|
|
If $enabled is $true, the return key on input panel is disabled when the entry has no text.
|
|
The return key on the input panel is automatically enabled when the entry has text.
|
|
]]
|
|
set {
|
|
}
|
|
values {
|
|
enabled: bool(false); [[If $true, the return key is automatically disabled when the entry has no text.]]
|
|
}
|
|
}
|
|
@property item_factory {
|
|
[[The factory that provides item in the text e.g.
|
|
"emoticon/happy" or "href=file://image.jpg" etc.
|
|
]]
|
|
values {
|
|
item_factory: Efl.Canvas.Text_Factory; [[Factory to create items]]
|
|
}
|
|
}
|
|
cursor_add {
|
|
[[Add cursor that will manipulate and iterate content of the text object.
|
|
It is typically more convenient to obtain a cursor directly from the text object using @.cursor_create.]]
|
|
params {
|
|
cursor: Efl.Text.Cursor; [[Text cursor.]]
|
|
}
|
|
}
|
|
cursor_create {
|
|
[[Creates and returns a new cursor for the text.]]
|
|
return: Efl.Text.Cursor @move; [[Text cursor.]]
|
|
}
|
|
input_panel_show {
|
|
[[Show the input panel (virtual keyboard) based on the input panel property of entry such as layout,
|
|
autocapital types and so on.
|
|
|
|
Note that input panel is shown or hidden automatically according to the focus state of entry widget.
|
|
This API can be used in the case of manually controlling by using @.input_panel_enabled.set(en, $false).
|
|
]]
|
|
}
|
|
selection_copy {
|
|
[[This executes a "copy" action on the selected text in the entry.]]
|
|
}
|
|
context_menu_clear {
|
|
[[This clears and frees the items in a entry's contextual (longpress)
|
|
menu.
|
|
|
|
See also @.context_menu_item_add.
|
|
]]
|
|
}
|
|
input_panel_imdata_set {
|
|
[[Set the input panel-specific data to deliver to the input panel.
|
|
|
|
This API is used by applications to deliver specific data to the input panel.
|
|
The data format MUST be negotiated by both application and the input panel.
|
|
The size and format of data are defined by the input panel.
|
|
]]
|
|
params {
|
|
@in data: const(void_ptr); [[The specific data to be set to the input panel.]]
|
|
@in len: int; [[The length of data, in bytes, to send to the input panel.]]
|
|
}
|
|
}
|
|
input_panel_imdata_get @const {
|
|
[[Get the specific data of the current input panel.]]
|
|
params {
|
|
@inout data: void; [[The specific data to be obtained from the input panel.]]
|
|
@out len: int; [[The length of data.]]
|
|
}
|
|
}
|
|
selection_paste {
|
|
[[This executes a "paste" action in the entry.]]
|
|
}
|
|
input_panel_hide {
|
|
[[Hide the input panel (virtual keyboard).
|
|
|
|
Note that input panel is shown or hidden automatically according to the focus state of entry widget.
|
|
This API can be used in the case of manually controlling by using @.input_panel_enabled.set(en, $false)
|
|
]]
|
|
}
|
|
cursor_selection_end {
|
|
[[This ends a selection within the entry as though
|
|
the user had just released the mouse button while making a selection.]]
|
|
}
|
|
selection_cut {
|
|
[[This executes a "cut" action on the selected text in the entry.]]
|
|
}
|
|
context_menu_item_add {
|
|
[[This adds an item to the entry's contextual menu.
|
|
|
|
A longpress on an entry will make the contextual menu show up unless this
|
|
has been disabled with @.context_menu_disabled.set.
|
|
By default this menu provides a few options like enabling selection mode,
|
|
which is useful on embedded devices that need to be explicit about it.
|
|
When a selection exists it also shows the copy and cut actions.
|
|
|
|
With this function, developers can add other options to this menu to
|
|
perform any action they deem necessary.
|
|
]]
|
|
params {
|
|
@in label: string @optional; [[The item's text label.]]
|
|
@in icon_file: string @optional; [[The item's icon file.]]
|
|
@in icon_type: Efl.Ui.Icon_Type; [[The item's icon type.]]
|
|
@in func: Context_Item_Clicked_Cb @optional; [[The callback to execute when the item is clicked.]]
|
|
@in data: const(void_ptr) @optional; [[The data to associate with the item for related functions.]]
|
|
}
|
|
}
|
|
}
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Object.finalize;
|
|
Efl.Object.destructor;
|
|
Efl.Gfx.Entity.visible { set; }
|
|
Efl.Gfx.Entity.position { set; }
|
|
Efl.Gfx.Entity.size { set; }
|
|
Efl.Canvas.Group.group_member_add;
|
|
Efl.Canvas.Group.group_calculate;
|
|
Efl.Layout.Signal.signal_callback_add;
|
|
Efl.Layout.Signal.signal_callback_del;
|
|
Efl.Layout.Signal.signal_emit;
|
|
Efl.Ui.Widget.on_access_activate;
|
|
Efl.Ui.Widget.theme_apply;
|
|
Efl.Ui.Focus.Object.on_focus_update;
|
|
Efl.Ui.Widget.interest_region { get; }
|
|
Efl.Ui.Widget.disabled {set;}
|
|
//Efl.Ui.Widget.widget_sub_object_del;
|
|
//Elm.Interface_Scrollable.policy { set; }
|
|
//Elm.Interface_Scrollable.bounce_allow { set; }
|
|
Efl.Access.Object.state_set { get; }
|
|
Efl.Access.Object.i18n_name { get; }
|
|
Efl.Access.Text.access_text { get; }
|
|
Efl.Access.Text.string { get; }
|
|
Efl.Access.Text.attribute { get; }
|
|
Efl.Access.Text.text_attributes { get; }
|
|
Efl.Access.Text.default_attributes { get; }
|
|
Efl.Access.Text.caret_offset { get; set; }
|
|
Efl.Access.Text.character { get; }
|
|
Efl.Access.Text.character_extents { get; }
|
|
Efl.Access.Text.character_count { get; }
|
|
Efl.Access.Text.offset_at_point { get; }
|
|
Efl.Access.Text.bounded_ranges { get; }
|
|
Efl.Access.Text.range_extents { get; }
|
|
Efl.Access.Text.access_selection { get; set; }
|
|
Efl.Access.Text.selections_count { get; }
|
|
Efl.Access.Text.selection_add;
|
|
Efl.Access.Text.selection_remove;
|
|
Efl.Access.Editable.Text.text_content { set; }
|
|
Efl.Access.Editable.Text.insert;
|
|
Efl.Access.Editable.Text.copy;
|
|
Efl.Access.Editable.Text.cut;
|
|
Efl.Access.Editable.Text.delete;
|
|
Efl.Access.Editable.Text.paste;
|
|
Efl.File.file { set; }
|
|
Efl.File.load;
|
|
Efl.File.unload;
|
|
Efl.Text_Interactive.editable { set; }
|
|
Efl.Part.part_get;
|
|
}
|
|
events {
|
|
changed: void; [[Called when entry changes]]
|
|
/* can be $NULL, tag nullable once Eolian supports it */
|
|
changed,user: Efl.Ui.Text_Change_Info;
|
|
[[The text object has changed due to user interaction]]
|
|
validate: Efl.Ui.Validate_Content_Info; [[Called when validating]]
|
|
context,open: void; [[Called when context menu was opened]]
|
|
preedit,changed: void; [[Called when entry preedit changed]]
|
|
press: void; [[Called when entry pressed]]
|
|
redo,request: void; [[Called when redo is requested]]
|
|
undo,request: void; [[Called when undo is requested]]
|
|
aborted: void; [[Called when entry is aborted]]
|
|
// FIXME: efl_ui_text doesn't support anchor callbacks yet.
|
|
//anchor,down: Elm.Entry_Anchor_Info; [[Called on anchor down]]
|
|
//anchor,hover,opened: Elm.Entry_Anchor_Hover_Info; [[Called when hover opened]]
|
|
//anchor,in: Elm.Entry_Anchor_Info; [[Called on anchor in]]
|
|
//anchor,out: Elm.Entry_Anchor_Info; [[Called on anchor out]]
|
|
//anchor,up: Elm.Entry_Anchor_Info; [[called on anchor up]]
|
|
cursor,changed,manual: void; [[Called on manual cursor change]]
|
|
}
|
|
}
|