elementary: convert to new ownership
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 15 Sep 2017 15:05:30 +0000 (17:05 +0200)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 15 Sep 2017 15:05:30 +0000 (17:05 +0200)
17 files changed:
src/lib/elementary/efl_config_global.eo
src/lib/elementary/efl_ui_focus_manager.eo
src/lib/elementary/efl_ui_win.eo
src/lib/elementary/elm_box.eo
src/lib/elementary/elm_dayselector.eo
src/lib/elementary/elm_entry.eo
src/lib/elementary/elm_gengrid.eo
src/lib/elementary/elm_gengrid_item.eo
src/lib/elementary/elm_genlist.eo
src/lib/elementary/elm_genlist_item.eo
src/lib/elementary/elm_grid.eo
src/lib/elementary/elm_interface_atspi_accessible.eo
src/lib/elementary/elm_interface_atspi_action.eo
src/lib/elementary/elm_interface_atspi_text.eo
src/lib/elementary/elm_naviframe.eo
src/lib/elementary/elm_web.eo
src/lib/elementary/elm_widget_item.eo

index 83edbee..a28f3fe 100644 (file)
@@ -50,7 +50,7 @@ class Efl.Config.Global (Efl.Object, Efl.Config)
             hidden: bool @optional; [[If $true, gets the full list of profiles,
                                       including those stored in hidden files.]]
          }
-         return: free(own(iterator<string>), eina_iterator_free); [[Iterator to profiles]]
+         return: iterator<string> @owned; [[Iterator to profiles]]
       }
       profile_exists {
          [[Returns whether a profile exists or not.]]
@@ -66,7 +66,7 @@ class Efl.Config.Global (Efl.Object, Efl.Config)
             is_user: bool; [[$true to lookup for a user profile or $false for
                              a system one.]]
          }
-         return: own(string); [[Directory of the profile, free after use.]]
+         return: string @owned; [[Directory of the profile, free after use.]]
       }
       profile_derived_add @protected {
          [[Add a new profile of the given name to be derived from the current
index b2265d4..62142e3 100644 (file)
@@ -124,7 +124,7 @@ interface Efl.Ui.Focus.Manager {
             params {
                 child : Efl.Ui.Focus.Object; [[The child object to inspect.]]
             }
-            return : own(ptr(Efl.Ui.Focus.Relations)); [[The list of relations
+            return : ptr(Efl.Ui.Focus.Relations) @owned; [[The list of relations
                 starting from $child.]]
         }
         logical_end {
index e5bda28..6fd70db 100644 (file)
@@ -368,7 +368,7 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, Efl.Access.Window,
               type @Efl.Canvas.Image or @Efl.Ui.Image are allowed.
             ]]
             values {
-               icon: own(Efl.Canvas.Object) @nullable;
+               icon: Efl.Canvas.Object @owned @nullable;
                   [[The image object to use for an icon.]]
             }
          }
index 0269d84..93b0ca8 100644 (file)
@@ -102,7 +102,7 @@ class Elm.Box (Elm.Widget)
               You must free this list with eina_list_free() once you are done with it.
 
             ]]
-            return: free(own(list<Efl.Canvas.Object>), eina_list_free) @warn_unused; [[List of children]]
+            return: list<Efl.Canvas.Object> @owned @warn_unused; [[List of children]]
          }
       }
       pack_end {
index 432ebe6..97b12d2 100644 (file)
@@ -123,7 +123,7 @@ class Elm.Dayselector (Efl.Ui.Layout)
 
            @since 1.8
          ]]
-         return: own(list<own(stringshare)>) @warn_unused; [[A list of seven strings to be used as weekday names.]]
+         return: list<stringshare @owned> @owned @warn_unused; [[A list of seven strings to be used as weekday names.]]
       }
       day_selected_set {
          [[Set the state of given Dayselector_Day.
index 70d5eb6..11f2af6 100644 (file)
@@ -632,7 +632,7 @@ class Elm.Entry (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
               Only the text is returned, any format that may exist will not be part
               of the return value. You must free the string when done with \@ref free.
             ]]
-            return: own(ptr(char)) @warn_unused; [[Character]]
+            return: string @owned @warn_unused; [[Character]]
          }
       }
       @property selection {
index 54aaf5a..e413912 100644 (file)
@@ -302,7 +302,7 @@ class Elm.Gengrid (Efl.Ui.Layout, Elm.Interface_Scrollable,
               in the list are only valid so long as those items are not
               deleted or the gengrid is not deleted.
             ]]
-            return: free(own(list<ptr(Elm_Gen_Item)>), eina_list_free) @warn_unused; [[
+            return: list<ptr(Elm_Gen_Item)> @owned @warn_unused; [[
                 The list of realized items or $null if none are realized.
             ]]
          }
index 42313eb..dc63ed3 100644 (file)
@@ -234,7 +234,7 @@ class Elm.Gengrid.Item(Elm.Widget.Item)
                  @since 1.18
                  ]]
                 params {
-                     @out l: own(list<own(Efl.Canvas.Object)>); [[The contents list to return.]]
+                     @out l: list<Efl.Canvas.Object @owned> @owned; [[The contents list to return.]]
                 }
            }
       }
index 1fc8fc3..6f98d31 100644 (file)
@@ -305,7 +305,7 @@ class Elm.Genlist (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
               item pointers in the list are only valid so long as those
               items are not deleted or the genlist is not deleted.
             ]]
-            return: free(own(list<ptr(Elm_Gen_Item)>), eina_list_free) @warn_unused; [[List of realized items]]
+            return: list<ptr(Elm_Gen_Item)> @owned @warn_unused; [[List of realized items]]
          }
       }
       @property selected_items {
@@ -425,7 +425,7 @@ class Elm.Genlist (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
            Return NULL if filter is not set. Application must take care
            of the case while calling the API. Must be freed after use.
          ]]
-         return: free(own(iterator<ptr(Elm_Gen_Item)>), eina_iterator_free); [[Iterator on genlist]]
+         return: iterator<ptr(Elm_Gen_Item)> @owned; [[Iterator on genlist]]
       }
       filtered_items_count @const {
          [[Return how many items have passed the filter currently.
index 4aea700..a6ef85d 100644 (file)
@@ -334,7 +334,7 @@ class Elm.Genlist.Item(Elm.Widget.Item)
                   elsewhere if the user wants to.
                 ]]
                 params {
-                     @out l: own(list<own(Efl.Canvas.Object)>); [[The contents list to return.]]
+                     @out l: list<Efl.Canvas.Object @owned> @owned; [[The contents list to return.]]
                 }
            }
            update {
index f132643..b635fad 100644 (file)
@@ -26,7 +26,7 @@ class Elm.Grid (Elm.Widget)
               It's possible to remove objects from the grid when walking this
               list, but these removals won't be reflected on it.
             ]]
-            return: free(own(list<Efl.Canvas.Object>), eina_list_free) @warn_unused; [[List of children]]
+            return: list<Efl.Canvas.Object> @owned @warn_unused; [[List of children]]
          }
       }
       clear {
index 7b2330d..c8cea42 100644 (file)
@@ -282,7 +282,7 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
          get {
          }
          values {
-            children: free(own(list<Elm.Interface.Atspi_Accessible>), eina_list_free); [[List of widget's children]]
+            children: list<Elm.Interface.Atspi_Accessible> @owned; [[List of widget's children]]
          }
       }
       @property role_name @protected {
@@ -298,7 +298,7 @@ mixin Elm.Interface.Atspi_Accessible (Efl.Interface, Efl.Object)
          get {
          }
          values {
-            attributes: free(own(list<own(ptr(Elm.Atspi.Attribute))>), elm_atspi_attributes_list_free); [[List of object attributes]]
+            attributes: free(list<ptr(Elm.Atspi.Attribute) @owned>, elm_atspi_attributes_list_free) @owned; [[List of object attributes]]
          }
       }
       @property index_in_parent @protected {
index 8673700..9cdb190 100644 (file)
@@ -60,7 +60,7 @@ mixin Elm.Interface.Atspi_Action ()
          params {
             @in id: int; [[ID for widget]]
          }
-         return: own(ptr(char)) @warn_unused; [[Should be freed by the user.]]
+         return: string @owned @warn_unused; [[Should be freed by the user.]]
       }
    }
 }
index f3cbf3d..4cad503 100644 (file)
@@ -70,7 +70,7 @@ interface Elm.Interface.Atspi.Text ()
             end_offset: ptr(int); [[Offset indicating end of string according to given granularity. -1 in case of error.]]
          }
          values {
-            string: own(ptr(char)); [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
+            string: string @owned; [[Newly allocated UTF-8 encoded string. Must be free by a user.]]
          }
       }
       @property text @protected {
@@ -82,7 +82,7 @@ interface Elm.Interface.Atspi.Text ()
             end_offset: int; [[End offset of text.]]
          }
          values {
-            text: own(ptr(char)); [[UTF-8 encoded text.]]
+            text: string @owned; [[UTF-8 encoded text.]]
          }
       }
       @property caret_offset @protected {
@@ -108,7 +108,7 @@ interface Elm.Interface.Atspi.Text ()
             end_offset: ptr(int); [[Position in text to which given attribute is set.]]
          }
          values {
-            value: own(ptr(char)); [[Value of text attribute. Should be free()]]
+            value: string @owned; [[Value of text attribute. Should be free()]]
          }
       }
       @property attributes @protected {
@@ -120,7 +120,7 @@ interface Elm.Interface.Atspi.Text ()
             end_offset: ptr(int); [[End offset]]
          }
          values {
-            attributes: own(list<own(ptr(Elm.Atspi_Text.Attribute))>); [[List of text attributes]]
+            attributes: list<ptr(Elm.Atspi_Text.Attribute) @owned> @owned; [[List of text attributes]]
          }
       }
       @property default_attributes @protected {
@@ -128,7 +128,7 @@ interface Elm.Interface.Atspi.Text ()
          get {
          }
          values {
-            attributes: own(list<own(ptr(Elm.Atspi_Text.Attribute))>); [[List of default attributes]]
+            attributes: list<ptr(Elm.Atspi_Text.Attribute) @owned> @owned; [[List of default attributes]]
          }
       }
       @property character_extents @protected {
@@ -176,7 +176,7 @@ interface Elm.Interface.Atspi.Text ()
             yclip: Elm.Atspi_Text.Clip_Type; [[AT-SPI yclip]]
          }
          values {
-            ranges: own(list<own(ptr(Elm.Atspi_Text.Range))>); [[List of ranges]]
+            ranges: list<ptr(Elm.Atspi_Text.Range) @owned> @owned; [[List of ranges]]
          }
       }
       @property range_extents @protected {
index f526919..4dd9469 100644 (file)
@@ -46,7 +46,7 @@ class Elm.Naviframe (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action)
          get {
             [[Get a list of all the naviframe items.]]
 
-            return: free(own(list<Elm.Widget.Item>), eina_list_free) @warn_unused; [[A list of naviframe items, @Elm.Widget.Item, or $NULL on failure. Note: The returned list MUST be freed.]]
+            return: list<Elm.Widget.Item> @owned @warn_unused; [[A list of naviframe items, @Elm.Widget.Item, or $NULL on failure. Note: The returned list MUST be freed.]]
          }
       }
       @property top_item {
index b1e37d3..f00b64c 100644 (file)
@@ -339,7 +339,7 @@ class Elm.Web (Elm.Widget)
               The string returned must be freed by the user when it's done
               with it.
             ]]
-            return: own(string) @warn_unused; [[A newly allocated string, or
+            return: string @owned @warn_unused; [[A newly allocated string, or
                                                       $null if nothing is selected
                                                       or an error occurred.]]
          }
@@ -351,7 +351,7 @@ class Elm.Web (Elm.Widget)
               The returned string must not be freed and is guaranteed to be
               stringshared.
             ]]
-            return: free(own(string), eina_stringshare_del) @warn_unused; [[
+            return: stringshare @owned @warn_unused; [[
                A stringshared internal string with the current title, or $null on
                failure.
             ]]
index 822a4e5..e1778dd 100644 (file)
@@ -197,7 +197,7 @@ class Elm.Widget.Item(Efl.Object, Elm.Interface.Atspi_Accessible,
 
                   @since 1.8]]
                 params {
-                     @in objs: own(list<Efl.Canvas.Object>); [[Order of objects to pass highlight]]
+                     @in objs: list<Efl.Canvas.Object> @owned; [[Order of objects to pass highlight]]
                 }
            }
            widget_get @const {