aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/efl/interfaces/efl_canvas_scene.eo
blob: 44539d3581299b52941d69408186afd40c3b67dd (plain) (blame)
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
import efl_input_device;
import efl_gfx_types;

interface Efl.Canvas.Scene
{
   [[Interface containing basic canvas-related methods and events.

     @since 1.22
   ]]
   methods {
      @property image_max_size {
         get {
            [[Get the maximum image size the canvas can possibly handle.

              This function returns the largest image or surface size that
              the canvas can handle in pixels, and if there is one, returns $true.
              It returns $false if no extra constraint on maximum image
              size exists.

              The default limit is 65535x65535.

            ]]
            return: bool; [[$true on success, $false otherwise]]
         }
         values {
            max: Eina.Size2D; [[The maximum image size (in pixels).]]
         }
      }
      group_objects_calculate {
         [[Call user-provided $calculate group functions and unset the
           flag signalling that the object needs to get recalculated to
           all group objects in the canvas.
         ]]
      }
      @property group_objects_calculating {
         get {
            [[Get if the canvas is currently calculating group objects.]]
         }
         values {
            calculating: bool; [[$true if currently calculating group objects.]]
         }
      }
      objects_at_xy_get {
         [[Retrieve a list of objects at a given position in a canvas.

           This function will traverse all the layers of the given canvas,
           from top to bottom, querying for objects with areas covering the
           given position. The user can exclude from the query objects which are
           hidden and/or which are set to pass events.

           Warning: This function will only evaluate top-level objects; child
           or "sub" objects will be skipped.
         ]]
         return: iterator<Efl.Gfx.Entity> @owned @warn_unused; [[
            The list of objects that are over the given position in $e.
         ]]
         params {
            @in pos: Eina.Position2D; [[The pixel position.]]
            @in include_pass_events_objects: bool; [[
               Boolean flag to include or not objects which pass events
               in this calculation.
            ]]
            @in include_hidden_objects: bool; [[
               Boolean flag to include or not hidden objects in this
               calculation.
            ]]
         }
      }
      object_top_at_xy_get @const {
         [[Retrieve the object stacked at the top of a given position
           in a canvas.

           This function will traverse all the layers of the given canvas,
           from top to bottom, querying for objects with areas covering the
           given position. The user can exclude from the query objects which are
           hidden and/or which are set to pass events.

           Warning: This function will only evaluate top-level objects; child
           or "sub" objects will be skipped.
         ]]
         return: Efl.Gfx.Entity @warn_unused; [[The canvas object that is over all other objects at the given position.]]
         params {
            @in pos: Eina.Position2D; [[The pixel position.]]
            @in include_pass_events_objects: bool; [[
               Boolean flag to include or not objects which pass events
               in this calculation.
            ]]
            @in include_hidden_objects: bool; [[
               Boolean flag to include or not hidden objects in this
               calculation.
            ]]
         }
      }
      objects_in_rectangle_get {
         [[Retrieve a list of objects overlapping a given rectangular region in a canvas.

           This function will traverse all the layers of the given canvas,
           from top to bottom, querying for objects with areas overlapping
           with the given rectangular region. The user can exclude
           from the query objects which are hidden and/or which are set to
           pass events.

           Warning: This function will only evaluate top-level objects; child
           or "sub" objects will be skipped.
         ]]
         return: iterator<Efl.Gfx.Entity> @owned @warn_unused; [[Iterator to objects]]
         params {
            @in rect: Eina.Rect; [[The rectangular region.]]
            @in include_pass_events_objects: bool; [[
               Boolean flag to include or not objects which pass events
               in this calculation.
            ]]
            @in include_hidden_objects: bool; [[
               Boolean flag to include or not hidden objects in this
               calculation.
            ]]
         }
      }
      object_top_in_rectangle_get @const {
         [[Retrieve the canvas object stacked at the top of a given
           rectangular region in a canvas

           This function will traverse all the layers of the given canvas,
           from top to bottom, querying for objects with areas overlapping
           with the given rectangular region. The user can exclude
           from the query objects which are hidden and/or which are set to
           pass events.

           Warning: This function will only evaluate top-level objects; child
           or "sub" objects will be skipped.
         ]]
         return: Efl.Gfx.Entity @warn_unused; [[
            The object that is over all other objects at the given
            rectangular region.
         ]]
         params {
            @in rect: Eina.Rect; [[The rectangular region.]]
            @in include_pass_events_objects: bool; [[
               Boolean flag to include or not objects which pass events
               in this calculation.
            ]]
            @in include_hidden_objects: bool; [[
               Boolean flag to include or not hidden objects in this
               calculation.
            ]]
         }
      }
      /* FIXME Efl.Input.Device is not stable yet*/
      seats @beta {
         [[Iterate over the available input device seats for the canvas.

           A "seat" is the term used for a group of input devices, typically including
           a pointer and a keyboard. A seat object is the parent of the individual input
           devices.
         ]]
         return: iterator<Efl.Input.Device> @owned;
            [[An iterator over the attached seats.]]
      }
      /* FIXME Efl.Input.Device is not stable yet*/
      @property device @beta{
         [[An input device attached to this canvas, found by name.

           Note: This function is meant to find seats and not individual
           input devices.

           See also @.seat to find a seat by id instead of by name.
         ]]
         get {
            [[Get a device by name.]]
         }
         keys {
            name: string; [[The name of the seat to find.]]
         }
         values {
            seat: Efl.Input.Device; [[The device or seat, $null if not found.]]
         }
      }
      /* FIXME Efl.Input.Device is not stable yet*/
      @property seat @beta {
         [[Get a seat attached to this canvas using the seat's id property.

           Seats are associated with an arbitrary integer id. The id is not a
           persistent value and should never be hardcoded, as it may change between
           runs of an application depending on the environment.

           See also @.device to find a seat by name instead of by id.
         ]]
         get {
            [[Get a seat by id.]]
         }
         keys {
            id: int; [[The id of the seat to find.]]
         }
         values {
            seat: Efl.Input.Device; [[The seat or $null if not found.]]
         }
      }
      /* FIXME Efl.Input.Device is not stable yet*/
      @property seat_default @beta {
         [[Get the default seat attached to this canvas.

           A canvas may have exactly one default seat.

           See also @.device to find a seat by name.
           See also @.seat to find a seat by id.
         ]]
         get {
            [[Get the default seat.]]
         }
         values {
            seat: Efl.Input.Device; [[The default seat or $null if one does not exist.]]
         }
      }
      /* FIXME Efl.Input.Device is not stable yet*/
      @property pointer_position @beta {
         get {
            [[This function returns the current known pointer coordinates

              This function returns the current position of the main input
              pointer (mouse, pen, etc...).
            ]]
            return: bool; [[$true if a pointer exists for the given seat, otherwise $false.]]
         }
         keys {
            seat: Efl.Input.Device; [[The seat, or $null to use the default.]]
         }
         values {
            pos: Eina.Position2D; [[The pointer position in pixels.]]
         }
      }
   }
   events {
      scene,focus,in: Efl.Input.Focus; [[Called when scene got focus]]
      scene,focus,out: Efl.Input.Focus; [[Called when scene lost focus]]
      object,focus,in: Efl.Input.Focus; [[Called when object got focus]]
      object,focus,out: Efl.Input.Focus; [[Called when object lost focus]]
      render,pre: void; [[Called when pre render happens]]
      /* tag nullable once supported by eolian */
      render,post @beta: Efl.Gfx.Event.Render_Post; [[Called when post render happens]]
      device,changed @beta : Efl.Input.Device; [[Called when input device changed]]
      device,added @beta: Efl.Input.Device; [[Called when input device was added]]
      device,removed @beta : Efl.Input.Device; [[Called when input device was removed]]
   }
}