diff options
author | Xavi Artigas <xavierartigas@yahoo.es> | 2020-03-03 11:12:08 +0100 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-03-04 17:26:30 +0100 |
commit | c78841efcf2fac3dd07e3abff52954e265999b66 (patch) | |
tree | 3a3fc9e4905f969ef39617393e179b8783e5f827 | |
parent | 9abd2604fa9b7f5a2275eafdf749dc8fffa12fef (diff) |
docs: Strengthen docs for Copy&Paste and Drag&Drop
Including Eina.Content
And a typo/bugfix in ecore_evas_x.
Differential Revision: https://phab.enlightenment.org/D11204
-rw-r--r-- | src/lib/ecore_evas/Ecore_Evas.h | 2 | ||||
-rw-r--r-- | src/lib/eina/eina_abstract_content.h | 68 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_dnd.eo | 82 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_selection.eo | 74 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_textbox.eo | 23 | ||||
-rw-r--r-- | src/lib/eo/eina_types.eot | 11 | ||||
-rw-r--r-- | src/modules/ecore_evas/engines/x/ecore_evas_x.c | 2 |
7 files changed, 163 insertions, 99 deletions
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h index ddc3622741..713ad9748f 100644 --- a/src/lib/ecore_evas/Ecore_Evas.h +++ b/src/lib/ecore_evas/Ecore_Evas.h | |||
@@ -3695,8 +3695,6 @@ typedef void (*Ecore_Evas_Selection_Changed_Cb)(Ecore_Evas *ee, unsigned int sea | |||
3695 | * Only one such callback can exist for each Ecore_Evas. Calling this method multiple | 3695 | * Only one such callback can exist for each Ecore_Evas. Calling this method multiple |
3696 | * times overwrites previous functions. Use a NULL @p func to stop being notified. | 3696 | * times overwrites previous functions. Use a NULL @p func to stop being notified. |
3697 | * | 3697 | * |
3698 | * You will not be notified about selection changes caused by yourself. (TODO: bu5hm4n?) | ||
3699 | * | ||
3700 | * @warning If and when this function is called depends on the underlying | 3698 | * @warning If and when this function is called depends on the underlying |
3701 | * windowing system. | 3699 | * windowing system. |
3702 | */ | 3700 | */ |
diff --git a/src/lib/eina/eina_abstract_content.h b/src/lib/eina/eina_abstract_content.h index 1436543f4e..32d3cc2533 100644 --- a/src/lib/eina/eina_abstract_content.h +++ b/src/lib/eina/eina_abstract_content.h | |||
@@ -4,22 +4,22 @@ | |||
4 | 4 | ||
5 | /** | 5 | /** |
6 | * @typedef Eina_Content | 6 | * @typedef Eina_Content |
7 | * Defines a abstract content segment | 7 | * Container for any type of content. |
8 | * | 8 | * |
9 | * Each Abstract content contains out of a Eina_Slice of memory. And a type. | 9 | * Each Eina_Content is made of an Eina_Slice of memory and an IANA MIME type: |
10 | * The type are IANA meme types. | 10 | * https://www.iana.org/assignments/media-types/media-types.xhtml |
11 | * | 11 | * |
12 | * @note if the type is a text-style type, the last byte of the slice must be \0 | 12 | * @note if the type is a text-style type, the last byte of the slice must be \0. |
13 | * | 13 | * |
14 | * @since 1.24 | 14 | * @since 1.24 |
15 | */ | 15 | */ |
16 | typedef struct _Eina_Content Eina_Content; | 16 | typedef struct _Eina_Content Eina_Content; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * @typedef Eina_Content_Convertion_Callback | 19 | * @typedef Eina_Content_Conversion_Callback |
20 | * | 20 | * |
21 | * Callback called when convertion from one type to another type is requested. | 21 | * Method called when conversion from one type to another is requested. |
22 | * The from and to type is specified when the callback is registered. | 22 | * The from and to types are specified when the callback is registered. |
23 | * The to type is also passed in the callback here. | 23 | * The to type is also passed in the callback here. |
24 | * The type of the from pointer does not need to be checked. | 24 | * The type of the from pointer does not need to be checked. |
25 | */ | 25 | */ |
@@ -38,7 +38,7 @@ EAPI const char* eina_content_as_file(Eina_Content *content); | |||
38 | /** | 38 | /** |
39 | * Convert the content of the object to another type. | 39 | * Convert the content of the object to another type. |
40 | * | 40 | * |
41 | * In case the convertion cannot be performaned, NULL is returned. | 41 | * In case the conversion cannot be performed, NULL is returned. |
42 | * | 42 | * |
43 | * @param[in] content The content to convert. | 43 | * @param[in] content The content to convert. |
44 | * @param[in] new_type The new type the returned content will have. | 44 | * @param[in] new_type The new type the returned content will have. |
@@ -57,19 +57,19 @@ EAPI Eina_Content* eina_content_convert(Eina_Content *content, const char *new_t | |||
57 | EAPI const char* eina_content_type_get(Eina_Content *content); | 57 | EAPI const char* eina_content_type_get(Eina_Content *content); |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * Get the type of the passed content. | 60 | * Get the Eina_Slice of the passed content. |
61 | * | 61 | * |
62 | * @param[in] content The content to fetch the type from. | 62 | * @param[in] content The content to fetch the data from. |
63 | * | 63 | * |
64 | * @return The path to the file. Do not free this. | 64 | * @return An Eina_Slice containing the data. Do not free. |
65 | */ | 65 | */ |
66 | EAPI const Eina_Slice eina_content_data_get(Eina_Content *content); | 66 | EAPI const Eina_Slice eina_content_data_get(Eina_Content *content); |
67 | 67 | ||
68 | /** | 68 | /** |
69 | * Create a new content object, with the slice of data with a specific type. | 69 | * Create a new content object, with the provided data and type. |
70 | * | 70 | * |
71 | * @param[in] data A slice of memory, the memory is duplicated. | 71 | * @param[in] data A slice of memory. The memory is copied. |
72 | * @param[in] type The type of memory. | 72 | * @param[in] type The type this data represents. |
73 | * | 73 | * |
74 | * @return The new content object. The caller owns this object. | 74 | * @return The new content object. The caller owns this object. |
75 | */ | 75 | */ |
@@ -85,62 +85,62 @@ EAPI void eina_content_free(Eina_Content *content); | |||
85 | /** | 85 | /** |
86 | * Register a new conversion callback. | 86 | * Register a new conversion callback. |
87 | * | 87 | * |
88 | * @param[in] from The tyoe you convert from. | 88 | * @param[in] from The type to convert from. |
89 | * @param[in] in The type you convert to. | 89 | * @param[in] to The type to convert to. |
90 | * | 90 | * |
91 | * @return True on success false otherwise. | 91 | * @return True if the callback was successfully registered. |
92 | */ | 92 | */ |
93 | EAPI Eina_Bool eina_content_converter_conversion_register(const char *from, const char *to, Eina_Content_Conversion_Callback convertion); | 93 | EAPI Eina_Bool eina_content_converter_conversion_register(const char *from, const char *to, Eina_Content_Conversion_Callback convertion); |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * Check if a specific convertion can be performanced. | 96 | * Check if a specific conversion can be performed. |
97 | * | 97 | * |
98 | * A convertion can only be performed if a callback is registered. | 98 | * A conversion can only be performed if a callback is registered. |
99 | * | 99 | * |
100 | * @param[in] from The type you convert from. | 100 | * @param[in] from The type to convert from. |
101 | * @param[in] in The type you convert to. | 101 | * @param[in] to The type to convert to. |
102 | * | 102 | * |
103 | * @return True if it can be performed, false if not. | 103 | * @return True if the conversion can be performed. |
104 | */ | 104 | */ |
105 | EAPI Eina_Bool eina_content_converter_convert_can(const char *from, const char *to); | 105 | EAPI Eina_Bool eina_content_converter_convert_can(const char *from, const char *to); |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Returns a iterator that can be used to find all the possible types that can be converted to. | 108 | * Returns an iterator containing all the target types that the provided source type can be converted to. |
109 | * | 109 | * |
110 | * @param[in] form The type you convert from | 110 | * @param[in] from The type to convert from. |
111 | * | 111 | * |
112 | * @return A Iterator, containing strings, free this via eina_iterator_free. | 112 | * @return An Iterator containing MIME type strings. Free this via eina_iterator_free. |
113 | */ | 113 | */ |
114 | EAPI Eina_Iterator* eina_content_converter_possible_conversions(const char *from); | 114 | EAPI Eina_Iterator* eina_content_converter_possible_conversions(const char *from); |
115 | 115 | ||
116 | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; | 116 | EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_CONTENT; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Convert the Eina_Content object to a Eina_Value. | 119 | * Convert the Eina_Content object to an Eina_Value. |
120 | * | 120 | * |
121 | * @param[in] content The Eina_Content struct that will be converted to a Eina_Value | 121 | * @param[in] content The Eina_Content struct that will be converted to an Eina_Value. |
122 | * | 122 | * |
123 | * @return A Eina_Value that is allocated, you need to free it. | 123 | * @return An newly-allocated Eina_Value. Caller owns it. |
124 | */ | 124 | */ |
125 | EAPI Eina_Value* eina_value_content_new(Eina_Content *content); | 125 | EAPI Eina_Value* eina_value_content_new(Eina_Content *content); |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * Convert the Eina_Content object to a Eina_Value. | 128 | * Creates an Eina_Value from an Eina_Content. |
129 | * | 129 | * |
130 | * @param[in] content The Eina_Content struct that will be converted to a Eina_Value | 130 | * @param[in] content The Eina_Content struct that will be converted to an Eina_Value. |
131 | * | 131 | * |
132 | * @return A Eina_Value with type EINA_VALUE_TYPE_CONTENT | 132 | * @return An Eina_Value with type EINA_VALUE_TYPE_CONTENT. |
133 | */ | 133 | */ |
134 | EAPI Eina_Value eina_value_content_init(Eina_Content *content); | 134 | EAPI Eina_Value eina_value_content_init(Eina_Content *content); |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * Get the content from the Eina_Value | 137 | * Gets the content from the Eina_Value. |
138 | * | 138 | * |
139 | * If the value is not of the type EINA_VALUE_TYPE_CONTENT, NULL will be returned and a error will be printed. | 139 | * If the value is not of the type EINA_VALUE_TYPE_CONTENT, NULL will be returned and an error will be printed. |
140 | * | 140 | * |
141 | * @param[in] value The value to get the content from | 141 | * @param[in] value The value to get the content from |
142 | * | 142 | * |
143 | * @return A allocated Eina_Content, you need to free it. | 143 | * @return A newly-allocated Eina_Content. Caller owns it. |
144 | */ | 144 | */ |
145 | EAPI Eina_Content* eina_value_to_content(const Eina_Value *value); | 145 | EAPI Eina_Content* eina_value_to_content(const Eina_Value *value); |
146 | 146 | ||
diff --git a/src/lib/elementary/efl_ui_dnd.eo b/src/lib/elementary/efl_ui_dnd.eo index 8ef19110d5..24ace0617c 100644 --- a/src/lib/elementary/efl_ui_dnd.eo +++ b/src/lib/elementary/efl_ui_dnd.eo | |||
@@ -1,63 +1,89 @@ | |||
1 | import eina_types; | 1 | import eina_types; |
2 | 2 | ||
3 | struct @beta Efl.Ui.Drop_Event { | 3 | struct @beta Efl.Ui.Drop_Event { |
4 | [[Event struct that contains information about what is avaiable at which position, in which seat]] | 4 | [[Information sent along Drag & Drop events.]] |
5 | position : Eina.Position2D; [[The position of the Drop event]] | 5 | position : Eina.Position2D; [[The position where the drop event occurred, in window coordinates.]] |
6 | seat : uint; [[In which seat it is happening]] | 6 | seat : uint; [[Which seat triggered the event.]] |
7 | available_types : accessor<string>; [[which types are avaiable, you should use one of these for a call to @Efl.Ui.Dnd.drop_data_get ]] | 7 | available_types : accessor<string>; [[Types with automatic conversion available. Use one of them in the call to |
8 | @Efl.Ui.Dnd.drop_data_get. | ||
9 | |||
10 | Types are IANA MIME types: | ||
11 | https://www.iana.org/assignments/media-types/media-types.xhtml | ||
12 | ]] | ||
8 | } | 13 | } |
9 | 14 | ||
10 | struct @beta Efl.Ui.Drop_Dropped_Event { | 15 | struct @beta Efl.Ui.Drop_Dropped_Event { |
11 | dnd : Efl.Ui.Drop_Event; [[The overall information]] | 16 | [[Information sent along Drop events.]] |
12 | action : string; [[The action the client should take]] | 17 | dnd : Efl.Ui.Drop_Event; [[Common information.]] |
18 | action : string; [[Requested action to perform upon reception of this data.]] | ||
13 | } | 19 | } |
14 | 20 | ||
15 | struct @beta Efl.Ui.Drag_Started_Event { | 21 | struct @beta Efl.Ui.Drag_Started_Event { |
16 | seat : uint; | 22 | [[Information sent along @Efl.Ui.Drag_Started_Event events.]] |
23 | seat : uint; [[Which seat triggered the event.]] | ||
17 | } | 24 | } |
18 | 25 | ||
19 | struct @beta Efl.Ui.Drag_Finished_Event { | 26 | struct @beta Efl.Ui.Drag_Finished_Event { |
20 | seat : uint; | 27 | [[Information sent along @Efl.Ui.Drag_Finished_Event events.]] |
21 | accepted : bool; | 28 | seat : uint; [[Which seat triggered the event.]] |
29 | accepted : bool; [[$true if the operation completed with a Drop, or $false if it was cancelled.]] | ||
22 | } | 30 | } |
23 | 31 | ||
24 | mixin @beta Efl.Ui.Dnd requires Efl.Object { | 32 | mixin @beta Efl.Ui.Dnd requires Efl.Object { |
33 | [[This mixin provides the ability to interact with the system's Drag & Drop facilities. | ||
34 | |||
35 | Applications starting a Drag & Drop operation operation are said to perform a "Drag" and use | ||
36 | the methods prefixed "drag_". | ||
37 | On the other hand, applications receiving dragged content are said to perform a "Drop" operation and use | ||
38 | the methods prefixed "drop_". | ||
39 | ]] | ||
25 | methods { | 40 | methods { |
26 | drag_start { | 41 | drag_start { |
27 | [[Start a drag from this client. | 42 | [[Starts a drag from this client. |
28 | 43 | ||
29 | @[Efl.Ui.Dnd.drag,started] will be emitted each time a successfull drag will be started. | 44 | @[Efl.Ui.Dnd.drag,started] is emitted each time a successful drag is started. |
30 | @[Efl.Ui.Dnd.drag,finished] will be emitted every time a drag is finished. | 45 | @[Efl.Ui.Dnd.drag,finished] is emitted every time a drag is finished. |
31 | ]] | 46 | ]] |
32 | params { | 47 | params { |
33 | content : Eina.Content @by_ref; [[The content you want to provide via dnd]] | 48 | content : Eina.Content @by_ref; [[The content being dragged.]] |
34 | @in action: string; [[Action when data is transferred]] | 49 | @in action: string; [[Requested action to perform by the receiver once content is transferred.]] |
35 | @in seat: uint; [[Specified seat for multiple seats case.]] | 50 | @in seat: uint; [[Seat starting the drag operation. When in doubt use 0.]] |
36 | } | 51 | } |
37 | return : Efl.Content; [[A UI element where you can just set your visual representation into]] | 52 | return : Efl.Content; [[An Efl.Ui element which you can use to render a visual representation |
53 | of the content being dragged (like a thumbnail, for example). | ||
54 | Use @Efl.Content.content.set on it to do so.]] | ||
38 | } | 55 | } |
39 | drag_cancel { | 56 | drag_cancel { |
40 | [[Cancel the on-going drag]] | 57 | [[Cancels an on-going drag operation.]] |
41 | params { | 58 | params { |
42 | @in seat: uint; [[Specified seat for multiple seats case.]] | 59 | @in seat: uint; [[Seat that started the drag operation. When in doubt use 0.]] |
43 | } | 60 | } |
44 | } | 61 | } |
45 | drop_data_get { | 62 | drop_data_get { |
46 | [[Get the data from the object that has selection]] | 63 | [[Retrieves the dropped data.]] |
47 | params { | 64 | params { |
48 | seat : uint; [[Specified seat for multiple seats case.]] | 65 | @in seat: uint; [[Seat that started the drag operation. When in doubt use 0.]] |
49 | acceptable_types : iterator<string>; [[The types that are acceptable for you]] | 66 | @in acceptable_types : iterator<string>; [[List of strings describing the type of content the application |
67 | can accept. Types are IANA MIME types: | ||
68 | https://www.iana.org/assignments/media-types/media-types.xhtml.]] | ||
50 | } | 69 | } |
51 | return : future<Eina.Content> @move; [[fullfilled when the content is transmitted, and ready to use]] | 70 | return : future<Eina.Content> @move; [[This future is fulfilled when the content is received (asynchronously) |
71 | and ready to use. | ||
72 | The Eina.Content specifies the type of the data. | ||
73 | If no matching type was found it returns an error. | ||
74 | ]] | ||
52 | } | 75 | } |
53 | } | 76 | } |
54 | events { | 77 | events { |
55 | drop,entered : Efl.Ui.Drop_Event; | 78 | drop,entered : Efl.Ui.Drop_Event; [[Dragged content entered the window. Its type can already be checked with |
56 | drop,left : Efl.Ui.Drop_Event; | 79 | @.drop_data_get to react before it is dropped, for example.]] |
57 | drop,position,changed : Efl.Ui.Drop_Event; | 80 | drop,left : Efl.Ui.Drop_Event; [[Dragged content left the window.]] |
58 | drop,dropped : Efl.Ui.Drop_Dropped_Event; | 81 | drop,position,changed : Efl.Ui.Drop_Event; [[Dragged content moved over the window. Its type can already be |
59 | drag,started : Efl.Ui.Drag_Started_Event; | 82 | checked with @.drop_data_get to react before it is dropped, |
60 | drag,finished : Efl.Ui.Drag_Finished_Event; | 83 | for example.]] |
84 | drop,dropped : Efl.Ui.Drop_Dropped_Event; [[Dragged content was dropped over the window.]] | ||
85 | drag,started : Efl.Ui.Drag_Started_Event; [[A Drag operation started.]] | ||
86 | drag,finished : Efl.Ui.Drag_Finished_Event;[[A Drag operation finished.]] | ||
61 | } | 87 | } |
62 | implements { | 88 | implements { |
63 | Efl.Object.constructor; | 89 | Efl.Object.constructor; |
diff --git a/src/lib/elementary/efl_ui_selection.eo b/src/lib/elementary/efl_ui_selection.eo index 492e60e117..7e0814d348 100644 --- a/src/lib/elementary/efl_ui_selection.eo +++ b/src/lib/elementary/efl_ui_selection.eo | |||
@@ -1,49 +1,76 @@ | |||
1 | import eina_types; | 1 | import eina_types; |
2 | 2 | ||
3 | enum @beta Efl.Ui.Cnp_Buffer{ | 3 | enum @beta Efl.Ui.Cnp_Buffer { |
4 | selection = 0, | 4 | [[System buffer to use in Copy & Paste operations.]] |
5 | copy_and_paste = 1, | 5 | selection = 0, [[Buffer typically used when the user selects (highlights) some text without explicitly |
6 | requesting to copy it.]] | ||
7 | copy_and_paste = 1, [[Buffer used when the user requests that the current selection is copied (using | ||
8 | Ctrl+C, for example).]] | ||
6 | } | 9 | } |
7 | 10 | ||
8 | struct @beta Efl.Ui.Wm_Selection_Changed { | 11 | struct @beta Efl.Ui.Wm_Selection_Changed { |
9 | buffer : Efl.Ui.Cnp_Buffer; | 12 | [[Information sent along the @[Efl.Ui.Selection.wm_selection,changed] event.]] |
10 | caused_by : Efl.Ui.Selection; | 13 | buffer : Efl.Ui.Cnp_Buffer; [[The system buffer that has changed.]] |
11 | seat : uint; | 14 | caused_by : Efl.Ui.Selection; [[The EFL widget that triggered the change. $NULL if it is not an EFL widget.]] |
15 | seat : uint; [[The seat that triggered the change.]] | ||
12 | } | 16 | } |
13 | 17 | ||
14 | mixin @beta Efl.Ui.Selection requires Efl.Object { | 18 | mixin @beta Efl.Ui.Selection requires Efl.Object { |
19 | [[This mixin provides the ability to interact with the system's Copy & Paste facilities. | ||
20 | ]] | ||
15 | methods { | 21 | methods { |
16 | selection_set { | 22 | selection_set { |
17 | [[Set the selection data to the object]] | 23 | [[Sets the current selection. |
24 | |||
25 | This sends the selected data to the system's specified buffer, making it available to other | ||
26 | applications for "pasting" it. | ||
27 | |||
28 | This is typically used when the user requests a "copy" operation. | ||
29 | ]] | ||
18 | params { | 30 | params { |
19 | buffer : Efl.Ui.Cnp_Buffer; | 31 | buffer : Efl.Ui.Cnp_Buffer; [[System buffer to use.]] |
20 | content : Eina.Content @by_ref; | 32 | content : Eina.Content @by_ref; [[Data to copy.]] |
21 | seat : uint; | 33 | seat : uint; [[Seat the data comes from. Use 0 when in doubt.]] |
22 | } | 34 | } |
23 | } | 35 | } |
24 | selection_clear { | 36 | selection_clear { |
25 | [[Clear the selection data from the object]] | 37 | [[Clears the current selection. |
38 | |||
39 | No data will be available to other applications to paste (until something else is selected). | ||
40 | ]] | ||
26 | params { | 41 | params { |
27 | buffer : Efl.Ui.Cnp_Buffer; | 42 | buffer : Efl.Ui.Cnp_Buffer; [[System buffer to clear.]] |
28 | seat : uint; | 43 | seat : uint; [[Seat to clear. Use 0 when in doubt.]] |
29 | } | 44 | } |
30 | } | 45 | } |
31 | selection_get { | 46 | selection_get { |
32 | [[Get the data from the object that has selection]] | 47 | [[Retrieves the data currently held in the specified buffer. |
48 | |||
49 | This is typically used when the user requests a "paste" operation. | ||
50 | |||
51 | This method is time consuming (since data can potentially be provided by another application), therefore, | ||
52 | it is recommended to verify the existence of a selection using @.has_selection before calling it. | ||
53 | ]] | ||
33 | params { | 54 | params { |
34 | buffer : Efl.Ui.Cnp_Buffer; | 55 | buffer : Efl.Ui.Cnp_Buffer; [[System buffer to use.]] |
35 | seat : uint; | 56 | seat : uint; [[Seat where the data should be pasted. Use 0 when in doubt.]] |
36 | acceptable_types : iterator<string>; | 57 | acceptable_types : iterator<string>; [[List of accepted IANA MIME types: |
58 | https://www.iana.org/assignments/media-types/media-types.xhtml | ||
59 | If automatic conversion cannot be provided to any of the accepted | ||
60 | types, an error will be returned. | ||
61 | ]] | ||
37 | } | 62 | } |
38 | return : future<Eina.Content> @move; | 63 | return : future<Eina.Content> @move; [[A future that will be resolved to the requested content, or to an |
64 | error if type conversion is not available or the requested buffer | ||
65 | is empty.]] | ||
39 | } | 66 | } |
40 | has_selection { | 67 | has_selection { |
41 | [[Determine whether the selection data has owner]] | 68 | [[Checks if the specified system buffer has content.]] |
42 | params { | 69 | params { |
43 | buffer : Efl.Ui.Cnp_Buffer; | 70 | buffer : Efl.Ui.Cnp_Buffer; [[System buffer to query.]] |
44 | seat : uint; | 71 | seat : uint; [[Seat to query. Use 0 when in doubt.]] |
45 | } | 72 | } |
46 | return : bool; [[$true if there is a available selection, $false if not]] | 73 | return : bool; [[$true if there is data available in the requested buffer.]] |
47 | } | 74 | } |
48 | } | 75 | } |
49 | implements { | 76 | implements { |
@@ -52,6 +79,7 @@ mixin @beta Efl.Ui.Selection requires Efl.Object { | |||
52 | Efl.Object.finalize; | 79 | Efl.Object.finalize; |
53 | } | 80 | } |
54 | events { | 81 | events { |
55 | wm_selection,changed : Efl.Ui.Wm_Selection_Changed; | 82 | wm_selection,changed : Efl.Ui.Wm_Selection_Changed; [[Event emitted when the content of one of the system's |
83 | buffers changes.]] | ||
56 | } | 84 | } |
57 | } | 85 | } |
diff --git a/src/lib/elementary/efl_ui_textbox.eo b/src/lib/elementary/efl_ui_textbox.eo index ff0898b6fc..2605c477a3 100644 --- a/src/lib/elementary/efl_ui_textbox.eo +++ b/src/lib/elementary/efl_ui_textbox.eo | |||
@@ -1,8 +1,13 @@ | |||
1 | enum Efl.Ui.Textbox_Cnp_Content { | 1 | enum @beta Efl.Ui.Textbox_Cnp_Content { |
2 | Nothing = 0, [[You can paste or drop nothing]] | 2 | [[What kind of content can be pasted into this widget using Copy & Paste or Drag & Drop functionality. |
3 | Text = 1, [[You can paste normal Text]] | 3 | |
4 | Markup = 3, [[You can paste Markup (Normal text is also just markup)]] | 4 | Multiple options can be OR-ed together. |
5 | Image = 4, [[You can paste Images]] | 5 | ]] |
6 | Nothing = 0, [[Nothing can be pasted or dropped into this widget.]] | ||
7 | Text = 1, [[Plain text can be pasted or dropped into this widget.]] | ||
8 | Markup = 3, [[Markup text can be pasted or dropped into this widget | ||
9 | (This includes Plain text).]] | ||
10 | Image = 4, [[Images can be pasted or dropped into this widget.]] | ||
6 | } | 11 | } |
7 | 12 | ||
8 | class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Clickable, | 13 | class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Clickable, |
@@ -39,18 +44,16 @@ class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Click | |||
39 | } | 44 | } |
40 | } | 45 | } |
41 | @property cnp_dnd_mode @beta { | 46 | @property cnp_dnd_mode @beta { |
42 | [[Control pasting of text and images for the widget. | 47 | [[Controls the type of content which can be pasted into the widget. |
43 | |||
44 | Normally the entry allows both text and images to be pasted. | ||
45 | 48 | ||
46 | Note: This only changes the behaviour of text. | 49 | By default, both text and images are allowed.. |
47 | ]] | 50 | ]] |
48 | set { | 51 | set { |
49 | } | 52 | } |
50 | get { | 53 | get { |
51 | } | 54 | } |
52 | values { | 55 | values { |
53 | allowed_formats : Efl.Ui.Textbox_Cnp_Content; [[Format for cnp]] | 56 | allowed_formats : Efl.Ui.Textbox_Cnp_Content; [[Allowed content types.]] |
54 | } | 57 | } |
55 | } | 58 | } |
56 | @property selection_handles_enabled { | 59 | @property selection_handles_enabled { |
diff --git a/src/lib/eo/eina_types.eot b/src/lib/eo/eina_types.eot index 106aa0885d..000a2567d9 100644 --- a/src/lib/eo/eina_types.eot +++ b/src/lib/eo/eina_types.eot | |||
@@ -60,7 +60,16 @@ struct @extern Eina.Matrix3 { | |||
60 | zz: double; [[ZZ value.]] | 60 | zz: double; [[ZZ value.]] |
61 | } | 61 | } |
62 | 62 | ||
63 | struct @extern Eina.Content; | 63 | struct @extern Eina.Content; [[ |
64 | Container for any type of content. | ||
65 | |||
66 | Each @Eina.Content is made of an @Eina.Slice of memory and an IANA MIME type: | ||
67 | https://www.iana.org/assignments/media-types/media-types.xhtml | ||
68 | |||
69 | If the type is a text-style type, the last byte of the slice must be \0. | ||
70 | |||
71 | @since 1.24 | ||
72 | ]] | ||
64 | 73 | ||
65 | struct @extern Eina.Matrix4 { | 74 | struct @extern Eina.Matrix4 { |
66 | [[A bidimensional array of floating point values with 4 rows and 4 columns. | 75 | [[A bidimensional array of floating point values with 4 rows and 4 columns. |
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c index d689a5622c..36afeb5495 100644 --- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c +++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c | |||
@@ -3794,7 +3794,7 @@ _search_fitting_type(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Ev | |||
3794 | if (mime_type == acceptable_type) | 3794 | if (mime_type == acceptable_type) |
3795 | HANDLE_TYPE() | 3795 | HANDLE_TYPE() |
3796 | 3796 | ||
3797 | //if there is no available type yet, check if we can convert to the desiared type via this type | 3797 | //if there is no available type yet, check if we can convert to the desired type via this type |
3798 | if (!found_conversion) | 3798 | if (!found_conversion) |
3799 | { | 3799 | { |
3800 | const char *convertion_type = NULL; | 3800 | const char *convertion_type = NULL; |