summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_smart.eo
blob: 56eb8f54da0b2dc0511cd07d758c4a264b837450 (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
/* XXX: Putting the next two as externs because this interface will hopefully
   be removed for efl 2.0, so no need to bother. */
struct @extern Evas.Smart;
struct @extern Evas.Smart_Cb_Description;

class Evas.Object_Smart (Evas.Object, Evas.Signal_Interface)
{
   eo_prefix: evas_obj_smart;
   data: Evas_Smart_Data;
   methods {
      @property need_recalculate {
         set {
            [[Set or unset the flag signalling that a given smart object needs to
              get recalculated.

              If this flag is set, then the $calculate() smart function of
              $obj will be called, if one is provided, during rendering phase of
              Evas (see evas_render()), after which this flag will be
              automatically unset.

              If that smart function is not provided for the given object, this
              flag will be left unchanged.

              Note: just setting this flag will not make the canvas' whole scene
              dirty, by itself, and evas_render() will have no effect. To
              force that, use evas_object_smart_changed(), that will also
              call this function automatically, with $true as parameter.

              See also @.need_recalculate.get, @.calculate and
              \@ref evas_smart_objects_calculate().]]
         }
         get {
            [[Get the value of the flag signalling that a given smart object needs to
              get recalculated.

              Note: this flag will be unset during the rendering phase, when the
              $calculate() smart function is called, if one is provided.
              If it's not provided, then the flag will be left unchanged
              after the rendering phase.

              See also @.need_recalculate.set, for more details.]]
         }
         values {
            value: bool; [[whether one wants to set ($true) or to unset
                           ($false) the flag.]]
         }
      }
      @property clip {
         set {
            [[No description supplied by the EAPI.]]
            legacy: null;
         }
         values {
            clip: Evas.Object *;
         }
      }
      @property color {
         set {
            [[No description supplied by the EAPI.]]
            legacy: null;
         }
         values {
            r: int;
            g: int;
            b: int;
            a: int;
         }
      }
      @property data {
         set {
            [[Store a pointer to user data for a given smart object.

              This data is stored independently of the one set by
              evas_object_data_set(), naturally.

              See also @.data.get.]]
         }
         values {
            data: void *; [[A pointer to user data.]]
         }
      }
      @property members {
         get {
            [[Retrieves the list of the member objects of a given Evas smart object.

              The returned list should be freed with $eina_list_free() when you
              no longer need it.

              This function will return $null when a non-smart object is passed.

              See also @.member_add, @.member_del and @.iterator_new.

              @since 1.7]]
            return: list<Evas.Object*> * @warn_unused; [[Returns the list of the member objects of $obj.]]
         }
      }
      @property smart {
         get {
            [[Get the @Evas.Smart from which $obj smart object was created.]]

            return: Evas.Smart * @warn_unused; [[the @Evas.Smart handle or $null, on errors.]]
         }
      }
      show {
         [[No description supplied by the EAPI.]]
         legacy: null;
      }
      move {
         [[No description supplied by the EAPI.]]
         legacy: null;
         params {
            @in x: Evas.Coord;
            @in y: Evas.Coord;
         }
      }
      callbacks_descriptions_set {
         [[Set an smart object instance's smart callbacks descriptions.

           These descriptions are hints to be used by introspection and are
           not enforced in any way.

           It will not be checked if instance callbacks descriptions have the
           same name as respective possibly registered in the smart object
           class. Both are kept in different arrays and users of
           evas_object_smart_callbacks_descriptions_get() should handle this
           case as they wish.

           Note: Becase $descriptions must be $null terminated, and
           because a $null name makes little sense, too,
           Evas_Smart_Cb_Description.name must not be $null.

           Note: While instance callbacks descriptions are possible, they are
           not recommended. Use class callbacks descriptions
           instead as they make you smart object user's life simpler and
           will use less memory, as descriptions and arrays will be
           shared among all instances.]]

         return: bool; [[$true on success, $false on failure.]]
         params {
            @in descriptions: const(Evas.Smart_Cb_Description)*; [[$null terminated array with
            @Evas.Smart_Cb_Description descriptions. Array elements won't be
            modified at run time, but references to them and their contents
            will be made, so this array should be kept alive during the whole
            object's lifetime.]]
         }
      }
      callbacks_descriptions_get @const {
         [[Retrieve an smart object's know smart callback descriptions (both
           instance and class ones).

           This call searches for registered callback descriptions for both
           instance and class of the given smart object. These arrays will be
           sorted by Evas_Smart_Cb_Description.name and also $null
           terminated, so both class_count and instance_count can be
           ignored, if the caller wishes so. The terminator $null is not
           counted in these values.

           Note: If just class descriptions are of interest, try
           evas_smart_callbacks_descriptions_get() instead.

           Note: Use $null pointers on the descriptions/counters you're not
           interested in: they'll be ignored by the function.

           \@ref evas_smart_callbacks_descriptions_get().]]
         params {
            @out class_descriptions: const(Evas.Smart_Cb_Description)**; [[Where to store class callbacks
            descriptions array, if any is known. If no descriptions are
            known, $null is returned.]]
            @out class_count: uint; [[Returns how many class callbacks descriptions
            are known.]]
            @out instance_descriptions: const(Evas.Smart_Cb_Description)**; [[Where to store instance callbacks
            descriptions array, if any is known. If no descriptions are
            known, $null is returned.]]
            @out instance_count: uint; [[Returns how many instance callbacks
            descriptions are known.]]
         }
      }
      iterator_new @const {
         [[Retrieves an iterator of the member objects of a given Evas smart object.

           See also @.member_add and @.member_del

           @since 1.8]]
         return: free(own(iterator<Evas.Object *> *), eina_iterator_free)
            @warn_unused; [[Returns the iterator of the member objects of $obj.]]
      }
      callback_description_find @const {
         [[Find callback description for callback called name
           or $null if not found.

           If parameter is $null, no search
           will be done on instance descriptions.]]
         params {
            @in name: const(char)* @nonull; [[name of desired callback, must not be $null.  The
            search have a special case for name being the same
            pointer as registered with Evas_Smart_Cb_Description, one
            can use it to avoid excessive use of strcmp().]]
            @out class_description: const(Evas.Smart_Cb_Description)*; [[pointer to return class description or
            $null if not found. If parameter is $null, no search will
            be done on class descriptions.]]
            @out instance_description: const(Evas.Smart_Cb_Description)*; [[pointer to return instance description.]]
         }
      }
      hide {
         [[No description supplied by the EAPI.]]
         legacy: null;
      }
      calculate {
         [[Call the calculate() smart function immediately on a given smart object.

           This will force immediate calculations (see #Evas_Smart_Class)
           needed for renderization of this object and, besides, unset the
           flag on it telling it needs recalculation for the next rendering
           phase.

           See also @.need_recalculate.set]]

      }
      add {
         [[Instantiates a new smart object described by $s.

           This is the function one should use when defining the public
           function adding an instance of the new smart object to a given
           canvas. It will take care of setting all of its internals to work
           as they should, if the user set things properly, as seem on the
           #EVAS_SMART_SUBCLASS_NEW, for example.]]
         legacy: null;
      }
      member_add {
         [[Set an Evas object as a member of a given smart object.

           Members will automatically be stacked and layered together with the
           smart object. The various stacking functions will operate on
           members relative to the other members instead of the entire canvas,
           since they now live on an exclusive layer (see
           evas_object_stack_above(), for more details).

           Any $smart_obj object's specific implementation of the
           $member_add() smart function will take place too, naturally.

           See also @.member_del.]]

         params {
            @in sub_obj: Evas.Object * @nonull; [[The member object.]]
         }
         legacy: null;
      }
      resize {
         [[No description supplied by the EAPI.]]
         legacy: null;
         params {
            @in w: Evas.Coord;
            @in h: Evas.Coord;
         }
      }
      clip_unset {
         [[No description supplied by the EAPI.]]
         legacy: null;
      }
      changed {
         [[Mark smart object as changed, dirty.

           This will flag the given object as needing recalculation,
           forcefully. As an effect, on the next rendering cycle its
           calculate() (see #Evas_Smart_Class) smart function will be called.

           See also @.need_recalculate.set and @.calculate.]]

      }
      member_del {
         [[Removes a member object from a given smart object.

           This removes a member object from a smart object, if it was added
           to any. The object will still be on the canvas, but no longer
           associated with whichever smart object it was associated with.

           See also @.member_add for more details.]]

         params {
            @in sub_obj: Evas.Object *; [[the member object.]]
         }
         legacy: null;
      }
      del {
         [[Deletes a smart object.]]
         legacy: null;
      }
      attach {
         [[Attach a given smart data to a given smart object.]]
         params {
            @in s: Evas.Smart *;
         }
         legacy: null;
      }
   }
   implements {
      class.constructor;
      class.destructor;
      Eo.Base.constructor;
      Evas.Object.smart_type_check_ptr;
      Evas.Object.smart_type_check;
      Evas.Object.smart_data.get;
   }
}