evas.vapi: bind HINT_EXPAND and HINT_FILL
[libeflvala.git] / vapi / evas.vapi
blobd85b72d0061df82c7304d1367f51eadc11e48b4f
1 /**
2  * Copyright (C) 2009-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
17  *
18  */
20 // TODO:
21 // * evas cache
22 // * evas image preloading
24 [CCode (cprefix = "Evas_", lower_case_cprefix = "evas_", cheader_filename = "Evas.h")]
25 namespace Evas
27     public void init();
28     public void shutdown();
30     public int render_method_lookup( string name );
32     //=======================================================================
33     [CCode (cprefix = "EVAS_FONT_HINTING_", cname = "Evas.h")]
34     public enum FontHintingFlags
35     {
36         NONE,       /**< No font hinting */
37         AUTO,       /**< Automatic font hinting */
38         BYTECODE    /**< Bytecode font hinting */
39     }
41     //=======================================================================
42     [CCode (cprefix = "EVAS_ASPECT_CONTROL_", cname = "Evas.h")]
43     public enum AspectControl
44     {
45         NONE,
46         NEITHER,
47         HORIZONTAL,
48         VERTICAL,
49         BOTH
50     }
52     //=======================================================================
53     [CCode (cprefix = "EVAS_LOAD_ERROR_", cname = "Evas.h")]
54     public enum LoadError
55     {
56         NONE,
57         GENERIC,
58         DOES_NOT_EXIST,
59         PERMISSION_DENIED,
60         RESOURCE_ALLOCATION_FAILED,
61         CORRUPT_FILE,
62         UNKNOWN_FORMAT
63     }
65     //=======================================================================
66     [CCode (cprefix = "EVAS_TEXTURE_", cname = "Evas.h")]
67     public enum TextureMode
68     {
69         REFLECT,
70         REPEAT,
71         RESTRICT,
72         RESTRICT_REFLECT,
73         RESTRICT_REPEAT,
74         PAD
75     }
77     //=======================================================================
78     namespace Hint
79     {
80         [CCode (cname = "EVAS_HINT_EXPAND")]
81         public const double EXPAND;
82         [CCode (cname = "EVAS_HINT_FILL")]
83         public const double FILL;
84     }
86     //=======================================================================
87     [CCode (cprefix = "EVAS_BORDER_FILL_", cname = "Evas.h")]
88     public enum BorderFillMode
89     {
90         NONE,
91         DEFAULT,
92         SOLID
93     }
94     
95     //=======================================================================
96     [CCode (cprefix = "EVAS_IMAGE_SCALE_HINT_", cname = "Evas.h")]
97     public enum ImageScaleHint
98     {
99         NONE,
100         DYNAMIC,
101         STATIC
102     }
104     //=======================================================================
105     [Compact]
106     [CCode (cname = "Evas", free_function = "evas_free")]
107     public class Canvas
108     {
109         [CCode (cname = "evas_new" )]
110         public Canvas();
112         public void output_method_set( int render_method );
113         public int output_method_get();
115         public void output_size_set( int w, int h );
116         public void output_size_get( out int w, out int h );
117         public void output_viewport_set( Coord x, Coord y, Coord w, Coord h );
118         public void output_viewport_get( out Coord x, out Coord y, out Coord w, out Coord h );
120         public Coord coord_screen_x_to_world( int x );
121         public Coord coord_screen_y_to_world( int y );
122         public int coord_world_x_to_screen( Coord x );
123         public int coord_world_y_to_screen( Coord y );
125         public void pointer_output_xy_get( out int x, out int y );
126         public void pointer_canvas_xy_get( out Coord x, out Coord y );
127         public int pointer_button_down_mask_get();
128         public bool pointer_inside_get();
130         public void data_attach_set( void *data );
131         public void* data_attach_get();
133         public void image_cache_flush();
134         public void image_cache_reload();
135         public void image_cache_set( int size );
136         public int image_cache_get();
138         public void font_path_clear();
139         public void font_path_append( string path );
140         public void font_path_prepend( string path );
141         public Eina.List<string> font_path_list();
142         public void font_hinting_set( FontHintingFlags hinting );
143         public FontHintingFlags font_hinting_get();
144         public bool font_hinting_can_hint( FontHintingFlags hinting );
145         public void font_cache_flush();
146         public void font_cache_set( int size );
147         public int font_cache_get();
148         public Eina.List<string> font_available_list();
149         public void font_available_list_free( Eina.List<string> available );
151         public Object? bottom_get();
152         public Object? top_get();
153         public Object? focus_get();
154     }
156     //=======================================================================
157     [SimpleType]
158     [BooleanType]
159     public struct Bool {}
161     //=======================================================================
162     [SimpleType]
163     [IntegerType (rank=6)]
164     public struct Coord {}
166     //=======================================================================
167     [SimpleType]
168     [IntegerType (rank=6)]
169     public struct FontSize {}
171     //=======================================================================
172     [CCode (cname = "Evas_Smart_Cb", instance_pos = 0)]
173     public delegate void Callback( Evas.Object obj, void* event_info );
175     //=======================================================================
176     [Compact]
177     [CCode (cheader_filename = "Evas.h", cname = "Evas_Map", cprefix = "evas_map_", free_function = "evas_map_free")]
178     public class Map
179     {
180         [CCode (cname = "evas_map_new")]
181         public Map( int count );
183         public void util_rotate( double degrees, Evas.Coord cx, Evas.Coord cy );
184         public void util_zoom( double zoomx, double zoomy, Evas.Coord cx, Evas.Coord cy );
186         public void smooth_set( bool enabled );
187         public bool smooth_get();
189         public void alpha_set( bool enabled );
190         public bool alpha_get();
192         public void point_coord_set( int idx, Evas.Coord x, Evas.Coord y, Evas.Coord z );
193         public void point_coord_get( int idx, out Evas.Coord x, out Evas.Coord y, out Evas.Coord z );
194         public void point_image_uv_set( int idx, double u, double v );
195         public void point_image_uv_get( int idx, out double u, out double v );
196         public void point_color_set( int idx, int r, int g, int b, int a );
197         public void point_color_get( int idx, out int r, out int g, out int b, out int a );
198     }
200     //=======================================================================
201     [Compact]
202     [CCode (cheader_filename = "Evas.h", free_function="evas_object_del")]
203     public abstract class Object
204     {
205         public void del();
207         public void show();
208         public void hide();
209         public bool visible_get();
211         public void scale_set( double scale );
212         public double scale_get();
214         public string type_get();
216         public void layer_set( int layer );
217         public int layer_get();
219         public void raise();
220         public void lower();
221         public void stack_above( Object above );
222         public void stack_below( Object below );
223         public Object above_get();
224         public Object below_get();
226         public void move( Coord x, Coord y );
227         public void resize( Coord w, Coord h );
228         public void geometry_get( out Coord x, out Coord y, out Coord w, out Coord h );
230         public void size_hint_align_set( double x, double y );
231         public void size_hint_min_set( Coord w, Coord h );
232         public void size_hint_max_set( Coord w, Coord h );
233         public void size_hint_padding_set( Coord l, Coord r, Coord t, Coord b );
234         public void size_hint_weight_set( double x, double y );
236         public void anti_alias_set( bool antialias );
237         public bool anti_alias_get();
239         public void color_set( int r, int g, int b, int a );
240         public void color_get( out int r, out int g, out int b, out int a );
241         public void color_interpolation_set( int color_space );
242         public int color_interpolation_get();
244         public void clip_set( Object clip );
245         public Object clip_get();
246         public void clip_unset( Object clip );
247         public weak Eina.List<Object> clipees_get();
249         public void data_set( string key, void* data );
250         public void* data_get( string key );
251         public void* data_del( string key );
253         public void map_enable_set( bool enabled );
254         public bool map_enable_get();
255         public void map_set( Map map );
256         public Map map_get();
258         public void name_set( string name );
259         public weak string name_get();
260         public Object? name_find( string name );
262         public weak Canvas evas_get();
264         public void focus_set( bool focus );
265         public bool focus_get();
267         public void smart_callback_add( string event, Callback func );
268     }
270     //=======================================================================
271     [Compact]
272     [CCode (cheader_filename = "Evas.h", cname = "Evas_Object", cprefix = "evas_object_rectangle_", free_function = "evas_object_del")]
273     public class Rectangle : Object
274     {
275         [CCode (cname = "evas_object_rectangle_add")]
276         public Rectangle( Canvas e );
277     }
279     //=======================================================================
280     [Compact]
281     [CCode (cheader_filename = "Evas.h", cname = "Evas_Object", cprefix = "evas_object_line_", free_function = "evas_object_del")]
282     public class Line : Object
283     {
284         [CCode (cname = "evas_object_line_add")]
285         public Line( Canvas e );
286     }
288     //=======================================================================
289     [Compact]
290     [CCode (cheader_filename = "Evas.h", cname = "Evas_Object", cprefix = "evas_object_gradient_", free_function = "evas_object_del")]
291     public class Gradient : Object
292     {
293         [CCode (cname = "evas_object_gradient_add")]
294         public Gradient( Canvas e );
295     }
297     //=======================================================================
298     [Compact]
299     [CCode (cheader_filename = "Evas.h", cname = "Evas_Object", cprefix = "evas_object_polygon_", free_function = "evas_object_del")]
300     public class Polygon : Object
301     {
302         [CCode (cname = "evas_object_polygon_add")]
303         public Polygon( Canvas e );
304     }
306     //=======================================================================
307     [Compact]
308     [CCode (cheader_filename = "Evas.h", cname = "Evas_Object", cprefix = "evas_object_image_", free_function = "evas_object_del")]
309     public class Image : Object
310     {
311         [CCode (cname = "evas_object_image_add")]
312         public Image( Canvas e );
314         public void size_set( int w, int h );
315         public void size_get( out int w, out int h);
317         public void filled_set(bool setting );
318         public void file_set( string file, string key );
320         [CCode (cname = "evas_object_image_data_set")]
321         public void image_data_set( void* data );
323         //public void   data_convert( Evas_Colorspace to_cspace );
324         //public void*   data_get( in Evas_Object* obj, bool for_writing );
326         public void data_copy_set( void* data );
327         public void data_update_add( int x, int y, int w, int h );
329         public void alpha_set( bool has_alpha );
330         public bool alpha_get();
331     }
333     //=======================================================================
334     [CCode (cprefix = "EVAS_TEXT_STYLE_", cname = "Evas.h")]
335     public enum TextStyle
336     {
337         PLAIN,
338         SHADOW,
339         OUTLINE,
340         SOFT_OUTLINE,
341         GLOW,
342         OUTLINE_SHADOW,
343         FAR_SHADOW,
344         OUTLINE_SOFT_SHADOW,
345         SOFT_SHADOW,
346         FAR_SOFT_SHADOW
347     }
349     //=======================================================================
350     [Compact]
351     [CCode (cheader_filename = "Evas.h", cname = "Evas_Object", cprefix = "evas_object_text_", free_function = "evas_object_del")]
352     public class Text : Object
353     {
354         [CCode (cname = "evas_object_text_add")]
355         public Text( Canvas e );
357         public void text_set( string text );
358         public weak string text_get();
359     }