[PATCH 3/5] fix several functions to return unowned and fix cnames
Łukasz Pankowski
lukpank at o2.pl
Fri Mar 12 18:55:31 CET 2010
---
vapi/ecore.vapi | 4 +-
vapi/eina.vapi | 6 ++--
vapi/elm.vapi | 68 +++++++++++++++++++++++++++---------------------------
vapi/evas.vapi | 22 +++++++++---------
4 files changed, 50 insertions(+), 50 deletions(-)
diff --git a/vapi/ecore.vapi b/vapi/ecore.vapi
index bbfe733..60a2b1d 100644
--- a/vapi/ecore.vapi
+++ b/vapi/ecore.vapi
@@ -252,10 +252,10 @@ namespace EcoreEvas
[CCode (cname = "ecore_evas_new")]
public Window( string engine, int x, int y, int w, int h, string? extra_options );
- public string engine_name_get();
+ public unowned string engine_name_get();
[CCode (cname = "ecore_evas_get")]
- public Evas.Canvas evas_get();
+ public unowned Evas.Canvas evas_get();
public void title_set( string t );
public weak string title_get();
diff --git a/vapi/eina.vapi b/vapi/eina.vapi
index 134d297..17da09f 100644
--- a/vapi/eina.vapi
+++ b/vapi/eina.vapi
@@ -205,7 +205,7 @@ namespace Eina
public delegate void FreeCallback();
public bool data_get(uint index, ref G data);
- public G container_get();
+ public unowned G container_get();
public void over(Each cb, uint start, uint end);
}
@@ -227,7 +227,7 @@ namespace Eina
public bool push(G data);
public void pop();
- public void data_set(G data);
+ public void data_set(uint index, G data);
public void data_get(uint index);
public uint count_get();
[CCode (cname="eina_array_iterator_new")]
@@ -515,7 +515,7 @@ namespace Eina
public bool load();
public bool unload();
public void* symbol_get(string symbol);
- public string file_get();
+ public unowned string file_get();
public static string symbol_path_get(string symbol, string subdir);
public static string environment_get_path(string env, string sub_dir);
public static Eina.Array<Module> list_get(Eina.Array array, string path, uint recursive, Cb cb, void* data);
diff --git a/vapi/elm.vapi b/vapi/elm.vapi
index 4facf85..aee4a59 100644
--- a/vapi/elm.vapi
+++ b/vapi/elm.vapi
@@ -104,7 +104,7 @@ public abstract class Object : Evas.Object
public void scale_set( double scale );
public double scale_get();
public void style_set( string style );
- public string style_get();
+ public unowned string style_get();
public void disabled_set( bool disabled );
public bool disabled_get();
@@ -296,7 +296,7 @@ public class Button : Elm.Object
public void label_set( string label );
public unowned string label_get();
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void autorepeat_set( bool autorepeat );
public void autorepeat_initial_timeout_set( double t );
public void autorepeat_gap_timeout_set( double t );
@@ -360,7 +360,7 @@ public class Toggle : Elm.Object
public void label_set( string label );
public unowned string label_get();
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void states_labels_set( string onlabel, string offlabel );
public void state_set( bool state );
public bool state_get();
@@ -506,7 +506,7 @@ public class Entry : Elm.Object
public void password_set( bool password );
public void entry_set( string entry );
public unowned string entry_get();
- public string selection_get();
+ public unowned string selection_get();
public void entry_insert( string entry );
public void line_wrap_set( bool wrap );
public void editable_set( bool editable );
@@ -525,7 +525,7 @@ public class Entry : Elm.Object
public void cursor_selection_end();
public bool cursor_is_format_get();
public bool cursor_is_visible_format_get();
- public string cursor_content_get();
+ public unowned string cursor_content_get();
public void selection_cut();
public void selection_copy();
public void selection_paste();
@@ -639,7 +639,7 @@ public class Bubble : Elm.Object
public void info_set( string info );
public void content_set( Elm.Object content );
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void corner_set( string corner );
}
@@ -668,11 +668,11 @@ public class Hoversel : Elm.Object
public void label_set( string label );
public unowned string label_get();
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void hover_begin();
public void hover_end();
public void clear();
- public Eina.List items_get();
+ public unowned Eina.List items_get();
public unowned HoverselItem item_add( string label, string? icon_file, IconType icon_type, Evas.Callback? func = null );
public void item_del( HoverselItem item );
/*
@@ -710,7 +710,7 @@ public class Toolbar : Elm.Object
[CCode (cname = "Elm_Toolbar_Item", free_function = "elm_toolbar_item_del")]
public class ToolbarItem
{
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public unowned string label_get();
public void label_set( string label );
//public void del_cb_set( ... );
@@ -720,7 +720,7 @@ public class ToolbarItem
public bool separator_get();
public void separator_set( bool separator );
public void menu_set( bool menu );
- public Elm.Object menu_get();
+ public unowned Elm.Object menu_get();
}
@@ -730,15 +730,15 @@ public class ToolbarItem
public class MenuItem
{
[CCode (cname = "elm_menu_object_get")]
- public Elm.Object object_get();
+ public unowned Elm.Object object_get();
public void label_set( string label );
//public void del_cb_set( ... );
public unowned string label_get();
public void icon_set( Elm.Object icon );
public void disabled_set( bool disabled );
- public void* item_data_get();
+ public void* data_get();
public void data_set( void* data );
- public Eina.List item_subitems_get();
+ public unowned Eina.List subitems_get();
}
//=======================================================================
@@ -800,7 +800,7 @@ public class Slider : Elm.Object
public void label_set( string label );
public unowned string label_get();
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void span_size_set( Evas.Coord size );
public void unit_format_set( string format );
public void indicator_format_set( string indicator );
@@ -867,7 +867,7 @@ public class Genlist : Elm.Object
public unowned GenlistItem at_xy_item_get( Evas.Coord x, Evas.Coord y, out int posret );
public unowned GenlistItem selected_item_get();
- public Eina.List<unowned GenlistItem> selected_items_get();
+ public unowned Eina.List<unowned GenlistItem> selected_items_get();
public unowned GenlistItem first_item_get();
public unowned GenlistItem last_item_get();
}
@@ -878,9 +878,9 @@ public class Genlist : Elm.Object
[CCode (cname = "Elm_Genlist_Item", free_function = "") /* Caution! Genlist items are owned by the list. */ ]
public class GenlistItem
{
- public GenlistItem next_get();
- public GenlistItem prev_get();
- public Genlist genlist_get();
+ public unowned GenlistItem next_get();
+ public unowned GenlistItem prev_get();
+ public unowned Genlist genlist_get();
public void subitems_clear();
public void selected_set( bool selected );
@@ -905,7 +905,7 @@ public class GenlistItem
public void data_set( void* data );
public void update();
- public Elm.Genlist object_get();
+ public unowned Elm.Genlist object_get();
}
@@ -919,7 +919,7 @@ public class Check : Elm.Object
public void label_set( string label );
public unowned string label_get();
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void state_set( bool state );
public bool state_get();
public void state_pointer_set( bool* statep );
@@ -936,7 +936,7 @@ public class Radio : Elm.Object
public void label_set( string label );
public unowned string label_get();
public void icon_set( Elm.Object icon );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void group_add( Elm.Object group );
public void state_value_set( int value );
public void value_set( int value );
@@ -955,8 +955,8 @@ public class Pager : Elm.Object
public void content_push( Elm.Object content );
public void content_pop();
public void content_promote( Elm.Object content );
- public Elm.Object content_bottom_get();
- public Elm.Object content_top_get();
+ public unowned Elm.Object content_bottom_get();
+ public unowned Elm.Object content_top_get();
public void style_set( string style );
}
@@ -967,7 +967,7 @@ public class Pager : Elm.Object
[CCode (cname = "Elm_Slideshow_Item", free_function = "elm_slideshow_item_del")]
public class SlideshowItem
{
- public Slideshow object_get();
+ public unowned Slideshow object_get();
}
public delegate Evas.Object? SlideshowItemGetFunc( Elm.Object obj );
@@ -1004,19 +1004,19 @@ public class Slideshow : Elm.Object
public static void show( SlideshowItem item );
public void next();
public void previous();
- public Eina.List<string> transitions_get();
+ public unowned Eina.List<string> transitions_get();
public void transition_set( string transition );
public void timeout_set( int timeout );
public int timeout_get();
public void loop_set( int loop );
public void clear();
- public Eina.List<SlideshowItem> items_get();
- public SlideshowItem item_current_get();
+ public unowned Eina.List<SlideshowItem> items_get();
+ public unowned SlideshowItem item_current_get();
}
//=======================================================================
-[CCode (cname = "Evas_Object", free_function = "evas_object_del")]
+[CCode (cname = "Evas_Object", cprefix = "elm_fileselector_", free_function = "evas_object_del")]
public class FileSelector : Elm.Object
{
[CCode (cname = "elm_fileselector_add")]
@@ -1030,13 +1030,13 @@ public class FileSelector : Elm.Object
public bool buttons_ok_cancel_get();
public void expandable_set( bool expand );
public void path_set( string path );
- public string path_get();
- public string selected_get();
+ public unowned string path_get();
+ public unowned string selected_get();
}
//=======================================================================
-[CCode (cname = "Evas_Object", free_function = "evas_object_del")]
+[CCode (cname = "Evas_Object", cprefix = "elm_progressbar_", free_function = "evas_object_del")]
public class ProgressBar : Elm.Object
{
[CCode (cname = "elm_progressbar_add")]
@@ -1148,9 +1148,9 @@ public class ListItem
public void* data_get();
public unowned string label_get();
public void label_set( string label );
- public Elm.Object icon_get();
+ public unowned Elm.Object icon_get();
public void icon_set( Elm.Object icon );
- public Elm.Object end_get();
+ public unowned Elm.Object end_get();
public void end_set( Elm.Object end );
}
@@ -1173,7 +1173,7 @@ public class Photocam : Elm.Object
public Photocam( Elm.Object? parent );
public int file_set( string file );
- public string file_get();
+ public unowned string file_get();
public void zoom_set( double zoom );
public double zoom_get();
public void zoom_mode_set( PhotocamZoomMode mode );
diff --git a/vapi/evas.vapi b/vapi/evas.vapi
index 840dc2b..3208181 100644
--- a/vapi/evas.vapi
+++ b/vapi/evas.vapi
@@ -197,10 +197,9 @@ namespace Evas
//=======================================================================
[Compact]
- [CCode (cname = "Evas", free_function = "evas_free")]
+ [CCode (cname = "Evas", cprefix = "evas_", free_function = "evas_free")]
public class Canvas
{
- [CCode (cname = "evas_new" )]
public Canvas();
public void output_method_set( int render_method );
@@ -246,9 +245,11 @@ namespace Evas
public Eina.List<string> font_available_list();
public void font_available_list_free( Eina.List<string> available );
- public Object? bottom_get();
- public Object? top_get();
- public Object? focus_get();
+ [CCode (cname="evas_object_bottom_get")]
+ public unowned Object? bottom_get();
+ [CCode (cname="evas_object_top_get")]
+ public unowned Object? top_get();
+ public unowned Object? focus_get();
}
//=======================================================================
@@ -277,7 +278,6 @@ namespace Evas
[CCode (cheader_filename = "Evas.h", cname = "Evas_Map", cprefix = "evas_map_", free_function = "evas_map_free")]
public class Map
{
- [CCode (cname = "evas_map_new")]
public Map( int count );
public void util_rotate( double degrees, Evas.Coord cx, Evas.Coord cy );
@@ -315,7 +315,7 @@ namespace Evas
public void scale_set( double scale );
public double scale_get();
- public string type_get();
+ public unowned string type_get();
public void layer_set( int layer );
public int layer_get();
@@ -324,8 +324,8 @@ namespace Evas
public void lower();
public void stack_above( Object above );
public void stack_below( Object below );
- public Object above_get();
- public Object below_get();
+ public unowned Object? above_get();
+ public unowned Object? below_get();
public void move( Coord x, Coord y );
public void resize( Coord w, Coord h );
@@ -346,7 +346,7 @@ namespace Evas
public int color_interpolation_get();
public void clip_set( Object clip );
- public Object clip_get();
+ public unowned Object clip_get();
public void clip_unset( Object clip );
public weak Eina.List<Object> clipees_get();
@@ -357,7 +357,7 @@ namespace Evas
public void map_enable_set( bool enabled );
public bool map_enable_get();
public void map_set( Map map );
- public Map map_get();
+ public unowned Map map_get();
public void name_set( string name );
public weak string name_get();
--
1.7.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
filename=0004-expose-most-of-_set-and-_get-functions-as-properties.patch
More information about the Smartphones-userland
mailing list