Compare commits

...

2 Commits

Author SHA1 Message Date
Youngbok Shin 2a06e638fe Add docs from existing APIs.
It also add an interface: efl_input_panel.eo
2016-05-23 21:09:02 +09:00
Youngbok Shin a2540ac9e6 Initialize for new text related interfaces 2016-05-19 19:33:39 +09:00
6 changed files with 405 additions and 0 deletions

View File

@ -0,0 +1,40 @@
enum Efl.Cnp.Mode
{
markup = 0,
no_image,
plain
}
interface Efl.Cnp {
methods {
@property mode {
[[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 {
}
values {
mode: Efl.Cnp.Mode; [[One of #Efl_Cnp_Mode: #EFL_CNP_MODE_MARKUP, #EFL_CNP_MODE_NO_IMAGE, #EFL_CNP_MODE_PLAINTEXT.]]
}
}
copy {
[[This executes a "copy" action on the text of the object.]]
return: const (char)*; [[Returns copied text]]
}
cut {
[[This executes a "cut" action on the text of the object.]]
return: const (char)*; [[Returns cutted text]]
}
paste {
[[This executes a "paste" action on the text of the object.]]
return: const (char)*; [[Returns pasted text]]
}
}
}

View File

@ -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.]]
}
}
}
}

View File

@ -0,0 +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 {
[[Set the cursor pos.
]]
}
get {
[[Return the current cursor pos.
]]
}
values {
position: int; [[The cursor's position]]
}
}
@property geometry {
get {
[[Returns the geometry of the cursor.
]]
}
values {
x: int; [[Cursor X position]]
y: int; [[Cursor Y position]]
w: int; [[Cursor width]]
h: int; [[Cursor height]]
}
}
@property bidi {
get {
[[Returns the direction of the cursor.
]]
}
values {
bidi: Efl.BiDi.Direction; [[the diretion of the cursor]]
}
}
move_begin {
[[Move the cursor to the beginning of text.
]]
return: bool; [[If the cursor is moved to the beginning of text, it returns true]]
}
move_end {
[[Move the cursor to the end of text.
]]
return: bool; [[If the cursor is moved to the end of text, it returns true]]
}
move_next {
[[Move the cursor to the next position of text.
]]
return: bool; [[If the cursor is moved to the next position of text, it returns true]]
}
move_prev {
[[Move the cursor to the previous position of text.
]]
return: bool; [[If the cursor is moved to the previous position of text, it returns true]]
}
move_up {
[[Move the cursor to the above line of text.
]]
return: bool; [[If the cursor is moved to the above line of text, it returns true]]
}
move_down {
[[Move the cursor to the below line of text.
]]
return: bool; [[If the cursor is moved to the below line of text, it returns true]]]
}
}
}

View File

@ -1,5 +1,37 @@
type Efl_Font_Size: int;
enum Efl.Text.Properties.Ellipsis
{
none = 0,
start,
middle,
end
}
enum Efl.Text.Properties.Horizontal_Alignment
{
default = 0,
left,
middle,
right
}
enum Efl.Text.Properties.Vertical_Alignment
{
default = 0,
top,
center,
bottom
}
enum Efl.Text.Properties.Wrap_Mode
{
none = 0,
char,
word,
mixed
}
interface Efl.Text.Properties {
methods {
@property font {
@ -54,5 +86,50 @@ interface Efl.Text.Properties {
font_source: const(char)*; [[The font file's path.]]
}
}
@property ellipsis {
[[Controls the ellipsis for the text object.]]
set {
}
get {
}
values {
ellipsis: Efl.Text.Properties.Ellipsis; [[The ellipsis. See @Efl.Text.Properties.Ellipsis]]
}
}
@property horizontal_alignment {
[[Controls horizontal alignment for text.]]
set {
}
get {
}
values {
align: Efl.Text.Properties.Horizontal_Alignment; [[The horizontal alignment. See @Efl.Text.Properties.Horizontal_Alignment]]
}
}
@property vertical_alignment {
[[Controls vertical alignment for text.]]
set {
}
get {
}
values {
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 {
}
get {
}
values {
ellipsis: Efl.Text.Properties.Wrap_Mode; [[The wrap mode to use. See @Efl.Text.Properties.Wrap_Mode for details on them.]]
}
}
}
}

View File

@ -0,0 +1,58 @@
interface Efl.Text.Selection {
methods {
@property enable {
[[Enable or disable selection feature.]]
set {
}
get {
}
values {
enable: bool; [[If $enable is true, the text selection is enabled.]]
}
}
@property region {
[[This selects a region of text within the object.
set {
}
get {
}
values {
start: int; [[The starting position.]]
end: int; [[The end position.]]
}
}
@property handler_disabled {
[[This disabled the selection handlers.]]
set {
}
get {
}
values {
disabled: bool; [[If $true, the selection handlers are disabled.]]
}
}
@property text {
get {
[[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)*;
}
}
all {
[[This selects all text within the object.]]
}
none {
[[This drops any existing text selection within the object.]]
}
}
}

View File

@ -18,3 +18,11 @@ struct @extern Efl.Time
tm_yday: int; [[Days in year.[0-365] ]]
tm_isdst: int; [[DST. [-1/0/1] ]]
}
enum Efl.BiDi.Direction
{
neutral = 0,
ltr,
rtl,
inherit
}