summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_widget.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_widget.eo')
-rw-r--r--src/lib/elementary/efl_ui_widget.eo289
1 files changed, 25 insertions, 264 deletions
diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo
index 9565c35..3d94b50 100644
--- a/src/lib/elementary/efl_ui_widget.eo
+++ b/src/lib/elementary/efl_ui_widget.eo
@@ -19,12 +19,11 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
19 Efl.Ui.Selection, Efl.Ui.Dnd 19 Efl.Ui.Selection, Efl.Ui.Dnd
20{ 20{
21 [[Efl UI widget abstract class]] 21 [[Efl UI widget abstract class]]
22 legacy_prefix: elm_widget;
23 //eo_prefix: efl_ui_widget; 22 //eo_prefix: efl_ui_widget;
24 event_prefix: efl_ui_widget; 23 event_prefix: efl_ui_widget;
25 data: Efl_Ui_Widget_Data; 24 data: Efl_Ui_Widget_Data;
26 methods { 25 methods {
27 @property cursor { 26 @property cursor @beta {
28 [[The cursor to be shown when mouse is over the object 27 [[The cursor to be shown when mouse is over the object
29 28
30 This is the cursor that will be displayed when mouse is over the 29 This is the cursor that will be displayed when mouse is over the
@@ -52,7 +51,7 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
52 by the display system or the theme.]] 51 by the display system or the theme.]]
53 } 52 }
54 } 53 }
55 @property cursor_style { 54 @property cursor_style @beta {
56 [[A different style for the cursor. 55 [[A different style for the cursor.
57 56
58 This only makes sense if theme cursors are used. 57 This only makes sense if theme cursors are used.
@@ -71,7 +70,7 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
71 transparent, ....]] 70 transparent, ....]]
72 } 71 }
73 } 72 }
74 @property cursor_theme_search_enabled { 73 @property cursor_theme_search_enabled @beta {
75 [[Whether the cursor may be looked in the theme or not. 74 [[Whether the cursor may be looked in the theme or not.
76 75
77 If $false, the cursor may only come from the render engine, 76 If $false, the cursor may only come from the render engine,
@@ -106,6 +105,8 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
106 @property disabled { 105 @property disabled {
107 [[Whether the widget is enabled (accepts and reacts to user inputs). 106 [[Whether the widget is enabled (accepts and reacts to user inputs).
108 107
108 The property works counted, this means, whenever n-caller set the value to $true, n-caller have to set it to $false in order to get it out of the disabled state again.
109
109 Each widget may handle the disabled state differently, but overall 110 Each widget may handle the disabled state differently, but overall
110 disabled widgets shall not respond to any input events. This is 111 disabled widgets shall not respond to any input events. This is
111 $false by default, meaning the widget is enabled. 112 $false by default, meaning the widget is enabled.
@@ -142,9 +143,9 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
142 ]] 143 ]]
143 set @protected { 144 set @protected {
144 [[Can only be called during construction, before finalize.]] 145 [[Can only be called during construction, before finalize.]]
145 return: Efl.Ui.Theme_Apply_Result(0); 146 return: Eina.Error;
146 [[Whether the style was successfully applied or not, see 147 [[Whether the style was successfully applied or not, see
147 the values of @Efl.Ui.Theme_Apply_Result for more information.]] 148 the values of Efl.Ui.Theme.Apply_Error for more information.]]
148 } 149 }
149 get { 150 get {
150 [[Returns the current style of a widget.]] 151 [[Returns the current style of a widget.]]
@@ -155,7 +156,7 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
155 for the available style names, or to the themes in use.]] 156 for the available style names, or to the themes in use.]]
156 } 157 }
157 } 158 }
158 widget_event @protected { 159 widget_input_event_handler @protected {
159 [[Virtual function handling input events on the widget. 160 [[Virtual function handling input events on the widget.
160 161
161 This method should return $true if the event has been processed. 162 This method should return $true if the event has been processed.
@@ -173,7 +174,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
173 [[Source object where the event originated. Often same as this.]] 174 [[Source object where the event originated. Often same as this.]]
174 } 175 }
175 return: bool; [[$true on success, $false otherwise]] 176 return: bool; [[$true on success, $false otherwise]]
176 legacy: null;
177 } 177 }
178 // FIXME: focus_allow? can_focus? focusable? 178 // FIXME: focus_allow? can_focus? focusable?
179 @property focus_allow { 179 @property focus_allow {
@@ -191,10 +191,8 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
191 not focusable, but a button is). 191 not focusable, but a button is).
192 ]] 192 ]]
193 set { 193 set {
194 legacy: elm_widget_can_focus_set;
195 } 194 }
196 get { 195 get {
197 legacy: elm_widget_can_focus_get;
198 } 196 }
199 values { 197 values {
200 can_focus: bool; [[Whether the object is focusable.]] 198 can_focus: bool; [[Whether the object is focusable.]]
@@ -206,47 +204,18 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
206 @Efl.Ui.Widget objects have a parent hierarchy that may differ slightly 204 @Efl.Ui.Widget objects have a parent hierarchy that may differ slightly
207 from their @Efl.Object or @Efl.Canvas.Object hierarchy. This is 205 from their @Efl.Object or @Efl.Canvas.Object hierarchy. This is
208 meant for internal handling. 206 meant for internal handling.
209
210 See also @.widget_top.
211 ]] 207 ]]
212 set { 208 set {
213 legacy: elm_widget_parent_set; /* internal in legacy */
214 } 209 }
215 get { 210 get {
216 legacy: elm_widget_parent_get; /* internal in legacy */
217 } 211 }
218 values { 212 values {
219 parent: Efl.Ui.Widget @nullable; [[Widget parent object]] 213 parent: Efl.Ui.Widget @nullable; [[Widget parent object]]
220 } 214 }
221 } 215 }
222 @property widget_top {
223 [[Root widget in the widget hierarchy.
224
225 This returns the top widget, in terms of widget hierarchy. This is
226 usually a window (@Efl.Ui.Win). This function walks the list of
227 @.widget_parent.
228
229 If this widget has no parent (in terms of widget hierarchy) this
230 will return $null.
231
232 Note: This may not be a display manager window in case of nested
233 canvases. If a "real" window is required, then you might want to
234 verify that the returned object is a @Efl.Ui.Win_Inlined, and then
235 get @Efl.Ui.Win_Inlined.inlined_parent to find an object in the
236 master window.
237
238 See also @.widget_parent.
239 ]]
240 get {
241 legacy: elm_widget_top_get; /* internal in legacy */
242 }
243 values {
244 top: Efl.Ui.Widget; [[Top widget, usually a window.]]
245 }
246 }
247 216
248 /* Accessibility */ 217 /* Accessibility */
249 @property access_info { 218 @property access_info @beta {
250 [[Accessibility information. 219 [[Accessibility information.
251 220
252 This is a replacement string to be read by the accessibility 221 This is a replacement string to be read by the accessibility
@@ -269,7 +238,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
269 @in act: Efl.Ui.Activate; [[Type of activation.]] 238 @in act: Efl.Ui.Activate; [[Type of activation.]]
270 } 239 }
271 return: bool; [[$true on success, $false otherwise]] 240 return: bool; [[$true on success, $false otherwise]]
272 legacy: null; /* FIXME: legacy API does extra work */
273 } 241 }
274 on_access_update @protected @beta { 242 on_access_update @protected @beta {
275 [[Hook function called when accessibility is changed on the widget. 243 [[Hook function called when accessibility is changed on the widget.
@@ -280,7 +248,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
280 params { 248 params {
281 @in enable: bool; [[$true if accessibility is enabled.]] 249 @in enable: bool; [[$true if accessibility is enabled.]]
282 } 250 }
283 legacy: null; /* FIXME: legacy API does extra work */
284 } 251 }
285 252
286 /* Internal hooks. */ 253 /* Internal hooks. */
@@ -296,7 +263,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
296 [[Sub object to be added. Not necessarily a widget itself.]] 263 [[Sub object to be added. Not necessarily a widget itself.]]
297 } 264 }
298 return: bool; [[Indicates if the operation succeeded.]] 265 return: bool; [[Indicates if the operation succeeded.]]
299 legacy: elm_widget_sub_object_add;
300 } 266 }
301 widget_sub_object_del @protected { 267 widget_sub_object_del @protected {
302 [[Virtual function handling sub objects being removed. 268 [[Virtual function handling sub objects being removed.
@@ -310,60 +276,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
310 [[Sub object to be removed. Should be a child of this widget.]] 276 [[Sub object to be removed. Should be a child of this widget.]]
311 } 277 }
312 return: bool; [[Indicates if the operation succeeded.]] 278 return: bool; [[Indicates if the operation succeeded.]]
313 legacy: elm_widget_sub_object_del;
314 }
315 @property orientation_mode {
316 [[Whether the widget's automatic orientation is enabled or not.
317
318 Orientation mode is used for widgets to change their style or send
319 signals based on the canvas rotation (i.e. the window orientation).
320 If the orientation mode is enabled, the widget will emit signals
321 such as "elm,state,orient,N" where $N is one of 0, 90, 180, 270,
322 depending on the window orientation. Such signals may be handled by
323 the theme in order to provide a different look for the widget based
324 on the canvas orientation.
325
326 By default orientation mode is enabled.
327
328 See also @.on_orientation_update.
329 ]]
330 values {
331 mode: Efl.Ui.Widget_Orientation_Mode(Efl.Ui.Widget_Orientation_Mode.default);
332 [[How window orientation should affect this widget.]]
333 }
334 }
335 on_orientation_update @protected {
336 [[Virtual function handling canvas orientation changes.
337
338 This method will be called recursively from the top widget (the
339 window) to all the children objects whenever the window rotation
340 is changed. The given $rotation will be one of 0, 90, 180, 270 or
341 the special value -1 if @.orientation_mode is $disabled.
342
343 If @.orientation_mode is $default, the widget implementation will
344 emit the signal "elm,state,orient,$R" will be emitted (where $R is
345 the rotation angle in degrees).
346
347 Note: This function may be called even if the orientation has not
348 actually changed, like when a widget needs to be reconfigured.
349
350 See also @.orientation_mode.
351 ]]
352 params {
353 rotation: int; [[Orientation in degrees: 0, 90, 180, 270 or -1 if
354 @.orientation_mode is $disabled.]]
355 }
356 }
357 on_disabled_update @protected {
358 [[Virtual function called when the widget becomes disabled.
359
360 This may be triggered even if this widget is not disabled, as the
361 parent widget could be disabled and propagate its state.
362 ]]
363 params {
364 disabled: bool; [[The new value of @.disabled.]]
365 }
366 return: bool; [[Indicates if the operation succeeded.]]
367 } 279 }
368 theme_apply @protected { 280 theme_apply @protected {
369 [[Virtual function called when the widget needs to re-apply its theme. 281 [[Virtual function called when the widget needs to re-apply its theme.
@@ -376,59 +288,22 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
376 Note: even widgets not based on layouts may override this method 288 Note: even widgets not based on layouts may override this method
377 to handle widget updates (scale, mirrored mode, etc...). 289 to handle widget updates (scale, mirrored mode, etc...).
378 ]] 290 ]]
379 return: Efl.Ui.Theme_Apply_Result; [[Indicates success, and if the current 291 return: Eina.Error; [[Indicates success, and if the current
380 theme or default theme was used.]] 292 theme or default theme was used.]]
381 } 293 }
382 294
383 /* Scroll API. */
384 @property on_show_region_hook @protected {
385 [[Hook function called when the @.show_region is changed.
386
387 See also @.show_region.
388 ]]
389 set {}
390 values {
391 func: Efl.Ui.Scrollable_On_Show_Region @nullable; [[Region hook function]]
392 }
393 }
394 @property show_region @protected {
395 [[Region inside the widget to show.
396
397 See also @.on_show_region_hook.
398 ]]
399 set {
400 [[Request parent scrollers to pan around so that this region
401 of the widget becomes visible.
402
403 If $force is $true this will trigger scroller changes and
404 the @.on_show_region_hook to be called even if the region is
405 unchanged.
406 ]]
407 values {
408 region: Eina.Rect; [[The region to show.]]
409 force: bool; [[Set to $true to force show even if unchanged.]]
410 }
411 }
412 get {
413 [[Returns the current region to show.]]
414 values {
415 region: Eina.Rect; [[The region to show.]]
416 }
417 }
418 }
419
420 /* FIXME: Scroll API. Not sure how those APIs should be exposed with 295 /* FIXME: Scroll API. Not sure how those APIs should be exposed with
421 * the new scrollable API. */ 296 * the new scrollable API. */
422 scroll_hold_push { 297 scroll_hold_push @beta {
423 [[Push scroll hold]] 298 [[Push scroll hold]]
424 } 299 }
425 scroll_hold_pop { 300 scroll_hold_pop @beta {
426 [[Pop scroller hold]] 301 [[Pop scroller hold]]
427 } 302 }
428 scroll_freeze_push { 303 scroll_freeze_push @beta {
429 [[Push scroller freeze]] 304 [[Push scroller freeze]]
430 } 305 }
431 scroll_freeze_pop { 306 scroll_freeze_pop @beta {
432 [[Pop scroller freeze]] 307 [[Pop scroller freeze]]
433 } 308 }
434 309
@@ -448,11 +323,8 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
448 i.e. X,Y start from 0,0 to indicate the top-left corner of the 323 i.e. X,Y start from 0,0 to indicate the top-left corner of the
449 widget. W,H must be greater or equal to 1 for this region to be 324 widget. W,H must be greater or equal to 1 for this region to be
450 taken into account, otherwise it is ignored. 325 taken into account, otherwise it is ignored.
451
452 See also @.interest_region_mode
453 ]] 326 ]]
454 get { 327 get {
455 legacy: elm_widget_focus_region_get;
456 } 328 }
457 values { 329 values {
458 region: Eina.Rect; 330 region: Eina.Rect;
@@ -460,24 +332,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
460 will be ignored, and no action will be taken.]] 332 will be ignored, and no action will be taken.]]
461 } 333 }
462 } 334 }
463 @property interest_region_mode {
464 [[Defines how @.show_region should be calculated.
465
466 It is up to the implementation of @.show_region.get to take this
467 value into account (or ignore it).
468 ]]
469 get {
470 legacy: elm_widget_focus_region_show_mode_get;
471 }
472 set {
473 legacy: elm_widget_focus_region_show_mode_set;
474 }
475 values {
476 mode: Efl.Ui.Interest_Region_Mode;
477 [[Whether to show a specific item or the widget as a whole.]]
478 }
479 }
480
481 /* Focus highlight (visual focus rectangle) properties */ 335 /* Focus highlight (visual focus rectangle) properties */
482 @property focus_highlight_geometry @protected { 336 @property focus_highlight_geometry @protected {
483 [[The rectangle region to be highlighted on focus. 337 [[The rectangle region to be highlighted on focus.
@@ -492,82 +346,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
492 region: Eina.Rect; [[The rectangle area.]] 346 region: Eina.Rect; [[The rectangle area.]]
493 } 347 }
494 } 348 }
495 @property focus_highlight_enabled {
496 [[Whether focus highlight is enabled or not.
497
498 As of EFL 1.21 focus highlight properties apply to a single window,
499 not a single widget. As a consequence, calls to this function may
500 be forwarded to the parent window. Future versions of EFL may
501 implement widget-specific focus highlight properties.
502
503 See also @.widget_top.
504 See also @.focus_highlight_style.
505 See also @.focus_highlight_animate.
506 ]]
507 set {
508 [[Set the enabled status for the focus highlight in a window.
509
510 This function will enable or disable the focus highlight,
511 regardless of the global setting for it.
512 ]]
513 }
514 get {
515 [[Get the enabled value of the focus highlight for this window.]]
516 }
517 values {
518 enabled: bool; [[The enabled value for the highlight.]]
519 }
520 }
521 @property focus_highlight_style {
522 [[Control the widget focus highlight style.
523
524 If $style is $null, the default will be used.
525
526 As of EFL 1.21 focus highlight properties apply to a single window,
527 not a single widget. As a consequence, calls to this function may
528 be forwarded to the parent window. Future versions of EFL may
529 implement widget-specific focus highlight properties.
530
531 See also @.widget_top.
532 See also @.focus_highlight_enabled.
533 See also @.focus_highlight_animate.
534 ]]
535 set {
536 /* FIXME: This is async... success here means nothing. */
537 return: bool; [[$true on success, $false otherwise.]]
538 }
539 get {
540 }
541 values {
542 style: string @nullable; [[The name of the focus highlight style.]]
543 }
544 }
545 @property focus_highlight_animate {
546 [[Whether focus highlight should animate or not.
547
548 As of EFL 1.21 focus highlight properties apply to a single window,
549 not a single widget. As a consequence, calls to this function may
550 be forwarded to the parent window. Future versions of EFL may
551 implement widget-specific focus highlight properties.
552
553 See also @.widget_top.
554 See also @.focus_highlight_style.
555 See also @.focus_highlight_enabled.
556 ]]
557 set {
558 [[Set the animate status for the focus highlight for this window.
559
560 This function will enable or disable the animation of focus
561 highlight.
562 ]]
563 }
564 get {
565 [[Get the animate value of the focus highlight for this window.]]
566 }
567 values {
568 animate: bool; [[The enabled value for the highlight animation.]]
569 }
570 }
571 @property focus_move_policy @beta { 349 @property focus_move_policy @beta {
572 [[The widget's focus move policy.]] 350 [[The widget's focus move policy.]]
573 values { 351 values {
@@ -583,39 +361,23 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
583 $false otherwise]] 361 $false otherwise]]
584 } 362 }
585 } 363 }
586
587 /* FIXME: No more items in EO API */
588 @property focused_item @beta {
589 get {
590 [[Get the focused widget item.]]
591 return: Elm.Widget.Item; [[Focused item]]
592 }
593 }
594
595 /* Focus Manager API */
596 focus_state_apply @protected { 364 focus_state_apply @protected {
597 [[Register focus with the given configuration. 365 [[Apply a new focus state on the widget.
598
599 The implementation can feel free to change the logical flag as it
600 wants, but other than that it should strictly keep the configuration.
601 366
602 The implementation in elm.widget updates the current state into what 367 This method is called internally by @Efl.Ui.Widget. Override it to change how a widget interacts with its focus manager.
603 is passed as configured state, respecting manager changes, 368 If a widget desires to change the applied configuration, it has to modify $configured_state in addition to any internal changes.
604 registeration and unregistration based on if it should be registered
605 or unregistered.
606 369
607 A manager field that is $null means that the widget should not or was 370 The default implementation (when this method is not overridden) applies $configured_state using the $manager contained inside.
608 not registered.
609 ]] 371 ]]
610 params { 372 params {
611 @in current_state : Efl.Ui.Widget_Focus_State; 373 @in current_state : Efl.Ui.Widget_Focus_State;
612 [[The focus manager to register with.]] 374 [[The current focus configuration of the widget.]]
613 @inout configured_state : Efl.Ui.Widget_Focus_State; 375 @inout configured_state : Efl.Ui.Widget_Focus_State;
614 [[The evaluated Focus state that should be used.]] 376 [[The new configuration being set on the widget.]]
615 @in redirect : Efl.Ui.Widget; 377 @in redirect : Efl.Ui.Widget;
616 [[A redirect that will be set by the elm.widget implementation.]] 378 [[A redirect object if there is any]]
617 } 379 }
618 return: bool; [[Returns whether the widget is registered or not.]] 380 return: bool; [[Returns $true if the widget is registered in the focus manager, $false if not.]]
619 } 381 }
620 } 382 }
621 parts { 383 parts {
@@ -634,11 +396,10 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
634 Efl.Gfx.Entity.position { set; } 396 Efl.Gfx.Entity.position { set; }
635 Efl.Gfx.Entity.size { set; } 397 Efl.Gfx.Entity.size { set; }
636 Efl.Gfx.Entity.scale { set; get; } 398 Efl.Gfx.Entity.scale { set; get; }
637 Efl.Canvas.Object.clip { set; } 399 Efl.Canvas.Object.clipper { set; }
638 Efl.Canvas.Object.no_render { set; } 400 Efl.Canvas.Object.no_render { set; }
639 Efl.Canvas.Object.is_frame_object { set; }
640 Efl.Canvas.Group.group_calculate; 401 Efl.Canvas.Group.group_calculate;
641 Efl.Canvas.Group.group_member_del; 402 Efl.Canvas.Group.group_member_remove;
642 Efl.Canvas.Group.group_member_add; 403 Efl.Canvas.Group.group_member_add;
643 Efl.Access.Object.i18n_name { get; } 404 Efl.Access.Object.i18n_name { get; }
644 Efl.Access.Object.state_set { get; } 405 Efl.Access.Object.state_set { get; }
@@ -660,6 +421,6 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
660 } 421 }
661 events { 422 events {
662 language,changed: void; [[Called when widget language changed]] 423 language,changed: void; [[Called when widget language changed]]
663 access,changed: void; [[Called when accessibility changed]] 424 access,changed @beta: void; [[Called when accessibility changed]]
664 } 425 }
665} 426}