summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_canvas_object.eo
blob: 2f4d3fe28ccb7651fb9eb04a0152716db57d6e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
import efl_text_types;

struct Efl.Canvas.Object_Animation_Event; [[Information of animation events]]

abstract Efl.Canvas.Object (Efl.Object, Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, Efl.Animator,
                            Efl.Input.Interface, Efl.Gfx.Size_Hint,
                            Efl.Gfx.Map, Efl.Loop_Consumer, Efl.Ui.Base, Efl.Canvas.Pointer)
{
   [[Efl canvas object abstract class]]
   legacy_prefix: evas_object;
   data: Evas_Object_Protected_Data;
   methods {
      @property pointer_mode_by_device {
         [[Low-level pointer behaviour by device.
           See @.pointer_mode.get and @.pointer_mode.set for more explanation.
           @since 1.19
         ]]
         keys {
            dev: Efl.Input.Device; [[The pointer device to set/get the mode. Use $null for the default pointer.]]
         }
         values {
             pointer_mode: Efl.Input.Object_Pointer_Mode; [[The pointer mode]]
         }
         set {
            return: bool; [[$true if pointer mode was set, $false otherwise]]
            legacy: null;
         }
         get {
            legacy: null;
         }
      }
      @property pointer_mode {
         [[Low-level pointer behaviour.

           This function has a direct effect on event callbacks related to
           pointers (mouse, ...).

           If the value is @Efl.Input.Object_Pointer_Mode.auto_grab (default),
           then when mouse is pressed down over this object, events will be
           restricted to it as source, mouse moves, for example, will be
           emitted even when the pointer goes outside this objects
           geometry.

           If the value is @Efl.Input.Object_Pointer_Mode.no_grab, then events
           will be emitted just when inside this object area.

           The default value is @Efl.Input.Object_Pointer_Mode.auto_grab.
           See also: @.pointer_mode_by_device.get and @.pointer_mode_by_device.set
           Note: This function will only set/get the mode for the default pointer.
         ]]
         get {
         }
         set {
            return: bool; [[$true if pointer behaviour was set, $false otherwise]]
         }
         values {
            pointer_mode: Efl.Input.Object_Pointer_Mode; [[Input pointer mode]]
         }
      }
      @property render_op {
         [[Render mode to be used for compositing the Evas object.

           Only two modes are supported:
           - @Efl.Gfx.Render_Op.blend means the object will be merged on
           top of objects below it using simple alpha compositing.
           - @Efl.Gfx.Render_Op.copy means this object's pixels will replace
           everything that is below, making this object opaque.

           Please do not assume that @Efl.Gfx.Render_Op.copy mode can be
           used to "poke" holes in a window (to see through it), as only the
           compositor can ensure that. Copy mode should only be used with
           otherwise opaque widgets or inside non-window surfaces (eg. a
           transparent background inside a buffer canvas).
         ]]
         set {
            legacy: null;
         }
         get {
            legacy: null;
         }
         values {
            render_op: Efl.Gfx.Render_Op; [[Blend or copy.]]
         }
      }
      @property freeze_events {
         set {
            [[Set whether an Evas object is to freeze (discard) events.

              If $freeze is $true, it will force events on $obj to be
              discarded. Unlike @.pass_events.set, events will not be
              passed to next lower object. This API can be used for
              blocking events while $obj is in transition.

              If $freeze is $false, events will be processed on that
              object as normal.
            
              Warning: If you block only key/mouse up events with this API,
              you can't be sure of the state of any objects that have only
              key/mouse down events.

              @since 1.1
            ]]
         }
         get {
            [[Determine whether an object is set to freeze (discard) events.

              @since 1.1
            ]]
         }
         values {
            freeze: bool; [[Pass when $obj is to freeze events ($true)
                            or not ($false).]]
         }
      }
      @property clip {
         set {
            [[Clip one object to another.

              This function will clip the object $obj to the area occupied
              by the object $clip. This means the object $obj will only be
              visible within the area occupied by the clipping object
              ($clip).

              The color of the object being clipped will be multiplied by
              the color of the clipping one, so the resulting color for the
              former will be "RESULT = (OBJ * CLIP) / (255 * 255)", per color
              element (red, green, blue and alpha).

              Clipping is recursive, so clipping objects may be clipped by
              others, and their color will in term be multiplied. You may
              not set up circular clipping lists (i.e. object 1 clips
              object 2, which clips object 1): the behavior of Evas is
              undefined in this case.

              Objects which do not clip others are visible in the canvas as
              normal; those that clip one or more objects become invisible
              themselves, only affecting what they clip. If an object ceases
              to have other objects being clipped by it, it will become
              visible again.

              The visibility of an object affects the objects that are
              clipped by it, so if the object clipping others is not shown
              (as in \@ref evas_object_show), the objects clipped by it will
              not be shown  either.

              If $obj was being clipped by another object when this function
              is  called, it gets implicitly removed from the old clipper's
              domain and is made now to be clipped by its new clipper.

              If $clip is $null, this call will disable clipping for the object
              i.e. its visibility and color get detached from the previous
              clipper. If it wasn't, this has no effect.

              Note: Only rectangle and image (masks) objects can be used
              as clippers. Anything else will result in undefined behaviour.
            ]]
         }
         get {
            [[Get the object clipping $obj (if any).

              This function returns the object clipping $obj. If $obj is
              not being clipped at all, $null is returned. The object $obj
              must be a valid Evas_Object.
            ]]
         }
         values {
            clip: Efl.Canvas.Object @nonull; [[The object to clip $obj by.]]
         }
      }
      @property repeat_events {
         set {
            [[Set whether an Evas object is to repeat events.

              If $repeat is $true, it will make events on $obj to also be
              repeated for the next lower object in the objects' stack (see
              see \@ref evas_object_below_get).

              If $repeat is $false, events occurring on $obj will be
              processed only on it.
            ]]
            /* FIXME-doc
            Example:
            @dontinclude evas-stacking.c
            @skip if (strcmp(ev->key, "r") == 0)
            @until }

            See the full @ref Example_Evas_Stacking "example".
            */
         }
         get {
            [[Determine whether an object is set to repeat events.]]
         }
         values {
            repeat: bool; [[Whether $obj is to repeat events ($true) or
                            not ($false).]]
         }
      }
      @property key_focus {
         [[Indicates that this object is the keyboard event receiver on
           its canvas.

           Changing focus only affects where (key) input events go.
           There can be only one object focused at any time. If $focus
           is $true, $obj will be set as the currently focused object
           and it will receive all keyboard events that are not
           exclusive key grabs on other objects.
           See also @.seat_focus_check,
           @.seat_focus_add, @.seat_focus_del.
         ]]
         set {
            legacy: evas_object_focus_set;
         }
         get {
            legacy: evas_object_focus_get;
         }
         values {
            focus: bool; [[$true when set as focused or $false otherwise.]]
         }
      }
      @property seat_focus {
         [[
            Check if this object is focused.
            @since 1.19
         ]]
         get {
            legacy: null;
         }
         values {
            focus: bool; [[$true if focused by at least one seat or $false otherwise.]]
         }
      }
      seat_focus_check {
         [[ Check if this object is focused by a given seat @since 1.19 ]]
         params {
            @in seat: Efl.Input.Device; [[The seat to check if the object is focused. Use $null for the default seat.]]
         }
         legacy: null;
         return: bool; [[$true if focused or $false otherwise.]]
      }
      seat_focus_add {
         [[ Add a seat to the focus list.

           Evas allows the Efl.Canvas.Object to be focused by multiple seats
           at the same time. This function adds a new seat to the focus list. In other words,
           after the seat is added to the list this object will now be also focused by this new seat.

           This function generates an \@ref EFL_CANVAS_OBJECT_EVENT_FOCUS_DEVICE_IN event.

           \@note The old focus APIs ( \@ref evas_object_focus_get, \@ref evas_object_focus_set,
           @.key_grab) will still work, however they will only act on the default seat.

           @since 1.19
         ]]
         params {
            @in seat: Efl.Input.Device; [[The seat that should be added to the focus list. Use $null for the default seat.]]
         }
         legacy: null;
         return: bool; [[$true if the focus has been set or $false otherwise.]]
      }
      seat_focus_del {
         [[ Remove a seat from the focus list.

            Removing an seat from the focus list is an unfocus operation, thus it will generate an
            \@ref EFL_CANVAS_OBJECT_EVENT_FOCUS_DEVICE_OUT event.
            @since 1.19
         ]]
         params {
            @in seat: Efl.Input.Device; [[The seat that should be removed from the focus list. Use $null for the default seat.]]
         }
         legacy: null;
         return: bool; [[$true if the seat was removed from the focus list or $false otherwise.]]
      }
      @property is_frame_object {
         [[If $true the object belongs to the window border decorations.

           This will be $false by default, and should be $false for all objects
           created by the application, unless swallowed in some very specific
           parts of the window.

           It is very unlikely that an application needs to call this manually,
           as the window will handle this feature automatically.

           @since 1.2
         ]]
         values {
            is_frame: bool; [[$true if the object is a frame, $false otherwise]]
         }
      }
      @property precise_is_inside {
         set {
            [[Set whether to use precise (usually expensive) point collision
              detection for a given Evas object.

              Use this function to make Evas treat objects' transparent
              areas as not belonging to it with regard to mouse pointer
              events. By default, all of the object's boundary rectangle
              will be taken in account for them.

              Warning: By using precise point collision detection you'll be
              making Evas more resource intensive.
            ]]
            /* FIXME-doc
            Example code follows.
            @dontinclude evas-events.c
            @skip if (strcmp(ev->key, "p") == 0)
            @until }

            See the full example @ref Example_Evas_Events "here".
            */
         }
         get {
            [[Determine whether an object is set to use precise point
              collision detection.
            ]]
         }
         values {
            precise: bool; [[Whether to use precise point collision
                             detection or not. The default value is false.]]
         }
      }
      @property propagate_events {
         set {
            [[Set whether events on a smart object's member should be
              propagated up to its parent.

              This function has no effect if $obj is not a member of a
              smart object.

              If $prop is $true, events occurring on this object will be
              propagated on to the smart object of which $obj is a member.
              If $prop is $false, events occurring on this object will not
              be propagated on to the smart object of which $obj is a
              member. The default value is $true.

              See also @.repeat_events.set, @.pass_events.set,
              @.freeze_events.set.
            ]]
         }
         get {
            [[Retrieve whether an Evas object is set to propagate events.

              See also @.repeat_events.get, @.pass_events.get,
              @.freeze_events.get.
            ]]
         }
         values {
            propagate: bool; [[Whether to propagate events ($true) or not
                               ($false).]]
         }
      }
      @property pass_events {
         set {
            [[Set whether an Evas object is to pass (ignore) events.

              If $pass is $true, it will make events on $obj to be ignored.
              They will be triggered on the next lower object (that is not
              set to pass events), instead (see \@ref evas_object_below_get).

              If $pass is $false events will be processed on that object
              as normal.

              See also @.repeat_events.set, @.propagate_events.set,
              @.freeze_events.set.
            ]]
         }
         get {
            [[Determine whether an object is set to pass (ignore) events.

              See also @.repeat_events.get, @.propagate_events.get,
              @.freeze_events.get.
            ]]
            /* FIXME-doc
            Example:
            @dontinclude evas-stacking.c
            @skip if (strcmp(ev->key, "p") == 0)
            @until }

            See the full @ref Example_Evas_Stacking "example".
            */
         }
         values {
            pass: bool; [[Whether $obj is to pass events ($true) or not
                         ($false).]]
         }
      }
      @property anti_alias {
         set {
            [[Sets whether or not the given Evas object is to be drawn
              anti-aliased.
            ]]
         }
         get {
            [[Retrieves whether or not the given Evas object is to be drawn
              anti_aliased.
            ]]
         }
         values {
            anti_alias: bool; [[$true if the object is to be anti_aliased,
                                $false otherwise.]]
         }
      }
      @property clipees {
         get {
            [[Return a list of objects currently clipped by $obj.

              This returns the internal list handle containing all
              objects clipped by the object $obj. If none are clipped by
              it, the call returns $null. This list is only valid until
              the clip list is changed and should be fetched again with
              another call to this function if any objects being clipped
              by this object are unclipped, clipped by a new object,
              deleted or get the clipper deleted. These operations will
              invalidate the list returned, so it should not be used
              anymore after that point. Any use of the list after this
              may have undefined results, possibly leading to crashes.

              See also @.clip.
            ]]
            legacy: null;
            return: iterator<Efl.Canvas.Object> @warn_unused; [[An iterator over the
                                             list of objects clipped by $obj.]]
         }
      }
      @property render_parent @protected {
         [[Gets the parent smart object of a given Evas object, if it has one.

           This can be different from @Efl.Object.parent because this one is
           used internally for rendering and the normal parent is what the
           user expects to be the parent.

           @since 1.18
         ]]
         get {
            legacy: evas_object_smart_parent_get;
         }
         values {
            parent: Efl.Canvas.Object; [[The parent smart object of $obj or $null.]]
         }
      }
      @property paragraph_direction {
         [[This handles text paragraph direction of the given object.
           Even if the given object is not textblock or text, its smart child
           objects can inherit the paragraph direction from the given object.
           The default paragraph direction is $inherit.
         ]]
         values {
            dir: Efl.Text_Bidirectional_Type; [[Paragraph direction for the given object.]]
         }
      }
      clipees_has @const {
         [[Test if any object is clipped by $obj.

           @since 1.8
         ]]
         return: bool @warn_unused; [[$true if any object is clipped by $obj, $false otherwise]]
      }
      key_grab {
         [[Requests $keyname key events be directed to $obj.

           Key grabs allow one or more objects to receive key events for
           specific key strokes even if other objects have focus. Whenever
           a key is grabbed, only the objects grabbing it will get the
           events for the given keys.

           $keyname is a platform dependent symbolic name for the key
           pressed (see \@ref Evas_Keys for more information).

           $modifiers and $not_modifiers are bit masks of all the
           modifiers that must and mustn't, respectively, be pressed along
           with $keyname key in order to trigger this new key grab.
           Modifiers can be things such as Shift and Ctrl as well as
           user defined types via \@ref evas_key_modifier_add. Retrieve
           them with \@ref evas_key_modifier_mask_get or use 0 for empty
           masks.

           $exclusive will make the given object the only one permitted to
           grab the given key. If given $true, subsequent calls on this
           function with different $obj arguments will fail, unless the key
           is ungrabbed again.

           Warning: Providing impossible modifier sets creates undefined
           behavior.

           See also @.key_ungrab, @.key_focus.get, @.key_focus.set,
           \@ref evas_focus_get, \@ref evas_key_modifier_add.
         ]]
         return: bool @warn_unused; [[$true if the call succeeded, $false otherwise.]]
         params {
            @in keyname: string @nonull; [[The key to request events for.]]
            @in modifiers: Efl.Input.Modifier; [[A combinaison of modifier
                              keys that must be present to trigger the event.]]
            @in not_modifiers: Efl.Input.Modifier; [[A combinaison of modifier
                          keys that must not be present to trigger the event.]]
            @in exclusive: bool; [[Request that the $obj is the only object
                                   receiving the $keyname events.]]
         }
         legacy: null;
      }
      key_ungrab {
         [[Removes the grab on $keyname key events by $obj.

           Removes a key grab on $obj if $keyname, $modifiers, and
           $not_modifiers match.

           See also @.key_grab, @.key_focus.get, @.key_focus.set,
           and the legacy API evas_focus_get.
         ]]
         params {
            @in keyname: string @nonull; [[The key the grab is set for.]]
            @in modifiers: Efl.Input.Modifier; [[A mask of modifiers that must be
                                                 present to trigger the event.]]
            @in not_modifiers: Efl.Input.Modifier; [[A mask of modifiers that must
                                                     not not be present to trigger
                                                     the event.]]
         }
         legacy: null;
      }
      @property no_render {
         get {
            [[Returns the state of the "no-render" flag, which means, when
              true, that an object should never be rendered on the canvas.

              This flag can be used to avoid rendering visible clippers on
              the canvas, even if they currently don't clip any object.

              @since 1.15
            ]]
            legacy: null;
         }
         set {
            [[Disable all rendering on the canvas.

              This flag will be used to indicate to Evas that this object
              should never be rendered on the canvas under any
              circumstances. In particular, this is useful to avoid
              drawing clipper objects (or masks) even when they don't
              clip any object. This can also be used to replace the old
              source_visible flag with proxy objects.

              This is different to the visible property, as even visible
              objects marked as "no-render" will never appear on screen.
              But those objects can still be used as proxy sources or
              clippers. When hidden, all "no-render" objects will
              completely disappear from the canvas, and hide their
              clippees or be invisible when used as proxy sources.

              @since 1.15
            ]]
            legacy: null;
         }
         values {
            enable: bool; [[Enable "no-render" mode.]]
         }
      }
      @property coords_inside {
         get {
           [[Returns whether the coords are logically inside the
           object.

           When this function is called it will return a value of either
           $false or $true, depending on if the coords are inside the object's
           current geometry.

           A return value of $true indicates the position is logically
           inside the object, and $false implies it is logically
           outside the object.

           If $e is not a valid object, the return value is undefined.
          ]]
          legacy: null;
         }
         keys {
            pos: Eina.Position2D; [[The position in pixels.]]
         }
         values {
            return: bool; [[$true if the coords are inside the object, $false otherwise]]
         }
      }
      @property event_animation {
         [[Set the $animation which starts when the given $desc happens to the object.]]
         get { legacy: null; }
         set { legacy: null; }
         keys {
            @cref desc: Efl.Event_Description;
               [[The event description for which the given $animation is set.]]
         }
         values {
            animation: Efl.Canvas.Animation;
               [[The animation which starts when the given $desc
                 happens to the object.]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.finalize;
      Efl.Object.invalidate;
      Efl.Object.destructor;
      Efl.Object.provider_find;
      Efl.Object.debug_name_override;
      Efl.Gfx.Entity.visible { get; set; }
      Efl.Gfx.Color.color { get; set; }
      Efl.Gfx.Entity.geometry { get; set; }
      Efl.Gfx.Entity.position { get; set; }
      Efl.Gfx.Entity.size { get; set; }
      Efl.Gfx.Stack.layer { get; set; }
      Efl.Gfx.Stack.below { get; }
      Efl.Gfx.Stack.above { get; }
      Efl.Gfx.Stack.stack_below;
      Efl.Gfx.Stack.stack_above;
      Efl.Gfx.Stack.raise;
      Efl.Gfx.Stack.lower;
      Efl.Gfx.Size_Hint.hint_aspect { get; set; }
      Efl.Gfx.Size_Hint.hint_align { get; set; }
      Efl.Gfx.Size_Hint.hint_combined_min { get; }
      Efl.Gfx.Size_Hint.hint_restricted_min { get; set; }
      Efl.Gfx.Size_Hint.hint_min { get; set; }
      Efl.Gfx.Size_Hint.hint_max { get; set; }
      Efl.Gfx.Size_Hint.hint_margin { get; set; }
      Efl.Gfx.Size_Hint.hint_weight { get; set; }
      Efl.Gfx.Entity.scale { set; get; }
      Efl.Input.Interface.seat_event_filter { get; set; }
      Efl.Loop_Consumer.loop { get; }
      Efl.Canvas.Pointer.pointer_inside { get; }
   }
   events {
      anim_started: Efl.Canvas.Object_Animation_Event; [[Animation is started.]]
      anim_running: Efl.Canvas.Object_Animation_Event; [[Animation is running.]]
      anim_ended: Efl.Canvas.Object_Animation_Event; [[Animation is ended.]]
   }
}