summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-10 19:23:20 +0900
committerHermet Park <hermetpark@gmail.com>2019-12-10 19:23:20 +0900
commit6fa91c71d8c63573883f57e397e788606029ba43 (patch)
tree432572834a811ee7d7b5bab0bdb474e2f6dba83b
parenta1ea861d882da58431e15290f07e545762d589ae (diff)
parentcbd02d3d51c6cbb6c118467088c6cd40f8114820 (diff)
Merge branch 'master' into devs/hermet/lottie
-rw-r--r--NEWS2
-rw-r--r--doc/elementary_examples.dox1
-rw-r--r--doc/elementary_examples_cxx.dox226
-rw-r--r--doc/main.dox1
-rw-r--r--meson.build3
-rw-r--r--src/bin/elementary/test_gfx_filters.c2
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh67
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh1
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_annotation.hh133
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh1
-rw-r--r--src/bindings/mono/eina_mono/eina_array.cs20
-rw-r--r--src/bindings/mono/eldbus_mono/eldbus_common.cs2
-rw-r--r--src/bindings/mono/eldbus_mono/eldbus_connection.cs12
-rw-r--r--src/bindings/mono/eldbus_mono/eldbus_object.cs8
-rw-r--r--src/bindings/mono/eldbus_mono/eldbus_proxy.cs6
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs19
-rw-r--r--src/examples/elementary/efl_ui_unit_converter.cs3
-rw-r--r--src/examples/elementary/location_example_01.c151
-rw-r--r--src/examples/elementary/meson.build1
-rw-r--r--src/examples/elocation/.gitignore1
-rw-r--r--src/examples/elocation/elocation.c167
-rw-r--r--src/examples/evas/efl-canvas-vg-simple.c37
-rw-r--r--src/lib/ecore_x/ecore_x_gesture.c18
-rw-r--r--src/lib/edje/edje_textblock.c44
-rw-r--r--src/lib/elementary/Elementary.h4
-rw-r--r--src/lib/elementary/Elementary_Options.h.in4
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.c86
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.eo2
-rw-r--r--src/lib/elementary/efl_ui_internal_text_scroller.c6
-rw-r--r--src/lib/elementary/efl_ui_internal_text_scroller.eo6
-rw-r--r--src/lib/elementary/efl_ui_text.c32
-rw-r--r--src/lib/elementary/efl_ui_text.eo2
-rw-r--r--src/lib/elementary/efl_ui_text_editable.eo8
-rw-r--r--src/lib/elementary/efl_ui_text_factory_emoticons.c2
-rw-r--r--src/lib/elementary/efl_ui_text_factory_emoticons.eo4
-rw-r--r--src/lib/elementary/efl_ui_text_factory_fallback.c8
-rw-r--r--src/lib/elementary/efl_ui_text_factory_fallback.eo4
-rw-r--r--src/lib/elementary/efl_ui_text_factory_images.c2
-rw-r--r--src/lib/elementary/efl_ui_text_factory_images.eo4
-rw-r--r--src/lib/elementary/elm_deprecated.h17
-rw-r--r--src/lib/elementary/elm_main.c21
-rw-r--r--src/lib/elementary/elm_need.h15
-rw-r--r--src/lib/elementary/elm_priv.h1
-rw-r--r--src/lib/elementary/meson.build4
-rw-r--r--src/lib/elocation/Elocation.h433
-rw-r--r--src/lib/elocation/elocation.c1414
-rw-r--r--src/lib/elocation/elocation_private.h186
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_client.c448
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_client.h36
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_location.c246
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_location.h22
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_manager.c209
-rw-r--r--src/lib/elocation/gen/eldbus_geo_clue2_manager.h23
-rw-r--r--src/lib/elocation/gen/eldbus_utils.h24
-rw-r--r--src/lib/elocation/gen/meson.build5
-rw-r--r--src/lib/elocation/gen/org.freedesktop.GeoClue2.xml199
-rw-r--r--src/lib/elocation/meson.build28
-rw-r--r--src/lib/evas/Efl_Canvas.h4
-rw-r--r--src/lib/evas/Evas_Eo.h6
-rw-r--r--src/lib/evas/canvas/efl_canvas_text_eo.legacy.c72
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock.eo (renamed from src/lib/evas/canvas/efl_canvas_text.eo)2
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.c72
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_eo.legacy.h (renamed from src/lib/evas/canvas/efl_canvas_text_eo.legacy.h)36
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_factory.eo (renamed from src/lib/evas/canvas/efl_canvas_text_factory.eo)2
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock_internal.h (renamed from src/lib/evas/canvas/efl_canvas_text_internal.h)24
-rw-r--r--src/lib/evas/canvas/efl_text_attribute_factory.c4
-rw-r--r--src/lib/evas/canvas/efl_text_attribute_factory.eo4
-rw-r--r--src/lib/evas/canvas/efl_text_cursor.c8
-rw-r--r--src/lib/evas/canvas/efl_text_cursor.eo8
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c600
-rw-r--r--src/lib/evas/canvas/evas_textblock_hyphenation.x4
-rw-r--r--src/lib/evas/canvas/evas_textblock_legacy.h12
-rw-r--r--src/lib/evas/canvas/meson.build6
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c20
-rw-r--r--src/tests/efl_mono/Eo.cs6
-rw-r--r--src/tests/elocation/elocation_suite.c235
-rw-r--r--src/tests/evas/evas_test_textblock.c102
77 files changed, 802 insertions, 4856 deletions
diff --git a/NEWS b/NEWS
index 1906fe9..3cfa365 100644
--- a/NEWS
+++ b/NEWS
@@ -385,7 +385,7 @@ Features:
385 * eo: Add "destruct" event 385 * eo: Add "destruct" event
386 * efl-wl: move to xdg-shell vfinal 386 * efl-wl: move to xdg-shell vfinal
387 * wayland: add xdg-shell vfinal support for client-side 387 * wayland: add xdg-shell vfinal support for client-side
388 * Canvas image: add Efl.Canvas.Text.Factory + use in Ui.Text 388 * Canvas image: add Efl.Canvas.Textblock.Factory + use in Ui.Text
389 * efl-wl: add functionality for directly passing through xkb objects 389 * efl-wl: add functionality for directly passing through xkb objects
390 * ecore-x: add more info to Ecore_X_Event_Xkb event 390 * ecore-x: add more info to Ecore_X_Event_Xkb event
391 * ecore-x: add some useful xkb function wrappers 391 * ecore-x: add some useful xkb function wrappers
diff --git a/doc/elementary_examples.dox b/doc/elementary_examples.dox
index dc7acba..76aa37e 100644
--- a/doc/elementary_examples.dox
+++ b/doc/elementary_examples.dox
@@ -6809,7 +6809,6 @@
6809 * @example efl_thread_win32_2.c 6809 * @example efl_thread_win32_2.c
6810 * @example efl_thread_win32_3.c 6810 * @example efl_thread_win32_3.c
6811 * @example efl_thread_win32_4.c 6811 * @example efl_thread_win32_4.c
6812 * @example location_example_01.c
6813 * @example naviframe_example.c 6812 * @example naviframe_example.c
6814 */ 6813 */
6815 6814
diff --git a/doc/elementary_examples_cxx.dox b/doc/elementary_examples_cxx.dox
index 6197450..b0e083f 100644
--- a/doc/elementary_examples_cxx.dox
+++ b/doc/elementary_examples_cxx.dox
@@ -33,8 +33,6 @@
33 * 33 *
34 * @ref icon_cxx_example_01 34 * @ref icon_cxx_example_01
35 * 35 *
36 * @ref location_cxx_example_01
37 *
38 * @ref menu_cxx_example_01 36 * @ref menu_cxx_example_01
39 * 37 *
40 * @ref popup_cxx_example_01 38 * @ref popup_cxx_example_01
@@ -3201,230 +3199,6 @@
3201 */ 3199 */
3202 3200
3203/** 3201/**
3204 * @page location_cxx_example_01 Location example with C++ Binding
3205 * @dontinclude location_cxx_example_01.cc
3206
3207 * This example shows how to integrate the Elocation.h library with
3208 * elementary.
3209
3210 * The first part consists of including the headers. In this case we
3211 * need to include both Elementary C++ binding and Elocation,
3212
3213 * @skip Elementary.hh
3214 * @until endif
3215
3216 * @attention All necessary libraries from Elementary, Elightenment, C
3217 * and/or C++ headers should be include here.
3218
3219 * Before our main code, we need a set of callbacks to react on
3220 * incoming elocation events. They are standard ecore events and we
3221 * register callbacks on these events in the main function.
3222
3223 * @skip void
3224 * @until ECORE_CALLBACK_DONE
3225 * @until }
3226
3227 * Now we need to actually start the code and initializing pointers
3228 * for address, addr_geocode, position and pos_geocode and an integer
3229 * status. We also run a check for elm_need_elocation.
3230
3231 * @skip EAPI_MAIN
3232 * @until -1
3233
3234 * Now let's set the elm_policy, which defines for a given policy
3235 * group/identifier a new policy's value, respectively. In this
3236 * example the only policy we need to set a value for is @c
3237 * ELM_POLICY_QUIT, possibles values for it are:
3238
3239 * @li @p ELM_POLICY_QUIT_NONE: Never quit the application
3240 * automatically;
3241
3242 * @li @p ELM_POLICY_QUIT_LAST_WINDOW_CLOSED: quit when the
3243 * application's last window is closed;
3244
3245 * @li @p ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN : quit when the
3246 * application's last window is hidden;
3247
3248 * @skipline elm_policy_set
3249
3250 * As you can see, the policy we chose was to quit when the last win
3251 * is hidden as opposed to examples with the C bindings where we
3252 * perpetually set it to quit when last win was closed. This changed
3253 * was necessary because in C++ binding as the elm mainloop stop
3254 * running all object are destroyed, references are unreferenced and
3255 * events are stopped at ELM_MAIN().
3256
3257 * @see For more details consult elm_policy_set
3258
3259 * Next step is creating an elementary window, in this example we use
3260 * the C++ binding method with the elm_win_util_standard_add that is a
3261 * elm_win_legacy function, better explained below. And then we set
3262 * the autohide state for it.
3263
3264 * @p elm_win_util_standard_add (const char *name, const char *tittle)
3265 * Adds a window object with standard setup.
3266 * Parameters:
3267
3268 * @li @p name - The name of the window;
3269
3270 * @li @p title - The title for the window.
3271
3272 * This creates a window but also puts in a standard background with
3273 * @p elm_bg_add(), as well as setting the window title to @p
3274 * title. The window type created is of type @c ELM_WIN_BASIC, with
3275 * the @c NULL as the parent widget. Returns the created object or @c
3276 * NULL on failure.
3277
3278 * The autohide works similarly to @p autodel, automatically handling
3279 * "delete,request" signals when set to @p true, with the difference
3280 * that it will hide the window, instead of destroying it.
3281
3282 * It is specially designed to work together with @p
3283 * ELM_POLICY_QUIT_LAST_WINDOW_HIDDEN which allows exiting
3284 * Elementary's main loop when all the windows are hidden.
3285
3286 * @skip ::elm::win
3287 * @until autohide_set
3288
3289 * @note @p autodel and @a autohide are not mutually exclusive. The
3290 * window will be destructed if both autodel and autohide is set to @p
3291 * EINA_TRUE or @p true.
3292
3293 * For this example we're using a label that will display the text
3294 * "Getting location ...". First we'll create our label, setting it's
3295 * parent, then setting the following label's options:
3296
3297 * @li @p line_wrap_set: Set the wrapping behavior of the label, by
3298 * default no wrapping is done. Possible values for wrap are:
3299 * @p ELM_WRAP_NONE - No wrapping;
3300 * @p ELM_WRAP_CHAR - wrap between characters;
3301 * @p ELM_WRAP_WORD - wrap between words;
3302 * @p ELM_WRAP_MIXED - Word wrap, and if that fails, char wrap.
3303
3304 * @ skipline wrap
3305
3306 * @li @p text_set: Set the text that label will display.
3307
3308 * @skipline text
3309
3310 * @li @p slide_mode_set: Set the slide mode of the label widget. By
3311 * default, slide mode is none. Possible values for mode are:
3312
3313 * ELM_LABEL_SLIDE_MODE_NONE - no slide effect
3314
3315 * ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger
3316 * than the text width length
3317
3318 * ELM_LABEL_SLIDE_MODE_ALWAYS -slide always
3319
3320 * @attention ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS
3321 * only work with the themes "slide_short", "slide_long" and
3322 * "slide_bounce". ELM_LABEL_SLIDE_MODE_AUTO,
3323 * ELM_LABEL_SLIDE_MODE_ALWAYS don't work if the line
3324 * wrap(elm_label_line_wrap_set()) or
3325 * ellipsis(elm_label_ellipsis_set()) is set.
3326
3327 * @skipline slide
3328
3329 * To better understand, the function @c size_hint_weight_set for C++
3330 * bindings originated from C bindings function
3331 * evas_object_size_hint_weight_set, that is EFL Evas type function.
3332 * With this function we set the hints for an object's weight. The
3333 * parameters are:
3334
3335 * @li x - Nonnegative double value to use as horizontal weight hint.
3336
3337 * @li y - Nonnegative double value to use as vertical weight hint.
3338
3339 * This is not a size enforcement in any way, it's just a hint that
3340 * should be used whenever appropriate. This is a hint on how a
3341 * container object should resize a given child within its area.
3342
3343 * Containers may adhere to the simpler logic of just expanding the
3344 * child object's dimensions to fit its own (see the EVAS_HINT_EXPAND
3345 * helper weight macro in the EFL Evas Documentation) or the complete
3346 * one of taking each child's weight hint as real weights to how much
3347 * of its size to allocate for them in each axis. A container is
3348 * supposed to, after normalizing the weights of its children (with
3349 * weight hints), distribute the space it has to layout them by those
3350 * factors – most weighted children get larger in this process than
3351 * the least ones.
3352
3353 * @dontinclude location_cxx_example_01.cc
3354 * @skipline weight_set
3355
3356 * @note Default weight hint values are 0.0, for both axis.
3357
3358 * The function @c size_hint_align_set for C++ bindings originated
3359 * from C bindings function evas_object_size_hint_align_set, that is
3360 * EFL Evas type function. With this function we set the hints for an
3361 * object's alignment. The parameters are:
3362
3363 * @li x - Double, ranging from 0.0 to 1.0 or with the special value
3364 * EVAS_HINT_FILL, to use as horizontal alignment hint.
3365
3366 * @li y - Double, ranging from 0.0 to 1.0 or with the special value
3367 * EVAS_HINT_FILL, to use as vertical alignment hint.
3368
3369 * These are hints on how to align an object inside the boundaries of
3370 * a container/manager. Accepted values are in the 0.0 to 1.0 range,
3371 * with the special value EVAS_HINT_FILL used to specify "justify" or
3372 * "fill" by some users. In this case, maximum size hints should be
3373 * enforced with higher priority, if they are set. Also, any padding
3374 * hint set on objects should add up to the alignment space on the
3375 * final scene composition.
3376
3377 * For the horizontal component, 0.0 means to the left, 1.0 means to
3378 * the right. Analogously, for the vertical component, 0.0 to the top,
3379 * 1.0 means to the bottom.
3380
3381 * This is not a size enforcement in any way, it's just a hint that
3382 * should be used whenever appropriate.
3383
3384 * @note Default alignment hint values are 0.5, for both axis.
3385
3386 * @skipline align_set
3387
3388 * Setting the size for label and make it visible.
3389
3390 * @skip size
3391 * @until visibility
3392
3393 * Going back to our elocation, first we'll create an address
3394 * and position object that we'll use for all our operations.
3395
3396 * @skip address
3397 * @until position
3398
3399 * We also have to register our callback so we get updates later on.
3400
3401 * @skipline ecore
3402
3403 * Now we need to get the elocation position and print it, using our
3404 * label. This fills in the object with the data from GeoClue.
3405
3406 * @skip elocation
3407 * @until print
3408
3409 * Now we only have to set the size for our window and make it
3410 * visible.
3411
3412 * @skip size_set
3413 * @until visibility_set
3414
3415 * And finally, start the elm mainloop, starting to handle events and
3416 * drawing operations.
3417
3418 * @skip elm_run
3419 * @until ELM_MAIN
3420
3421 * The full code for this example can be found at @ref location_cxx_example_01.cc
3422
3423 * @example location_cxx_example_01.cc
3424 */
3425
3426
3427/**
3428 * @page menu_cxx_example_01 Menu Example with C++ Binding 3202 * @page menu_cxx_example_01 Menu Example with C++ Binding
3429 * @dontinclude menu_cxx_example_01.cc 3203 * @dontinclude menu_cxx_example_01.cc
3430 3204
diff --git a/doc/main.dox b/doc/main.dox
index a0e3288..46f3c4e 100644
--- a/doc/main.dox
+++ b/doc/main.dox
@@ -43,7 +43,6 @@
43 * <h3>Early stage libraries (BETA testing)</h3> 43 * <h3>Early stage libraries (BETA testing)</h3>
44 * 44 *
45 * @li @ref eolian_main an EO file parser and code generator. 45 * @li @ref eolian_main an EO file parser and code generator.
46 * @li @ref elocation_main awareness library.
47 * 46 *
48 * If you are looking for methods that do not fit into the above list you can 47 * If you are looking for methods that do not fit into the above list you can
49 * see the full <a href="modules.html" />module listing</a>. 48 * see the full <a href="modules.html" />module listing</a>.
diff --git a/meson.build b/meson.build
index b8c7136..a24b6e0 100644
--- a/meson.build
+++ b/meson.build
@@ -297,8 +297,7 @@ subprojects = [
297['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []], 297['emotion' ,[] , true, true, false, false, true, true, ['eina', 'efl', 'eo'], []],
298['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []], 298['ethumb' ,[] , true, true, true, false, false, false, ['eina', 'efl', 'eo'], []],
299['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []], 299['ethumb_client' ,[] , false, true, true, false, false, true, ['eina', 'efl', 'eo', 'ethumb'], []],
300['elocation' ,[] , false, true, false, false, false, false, ['ecore', 'eldbus'], []], 300['elementary' ,[] , true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio'], ['atspi']],
301['elementary' ,[] , true, true, true, true, true, true, ['eina', 'efl', 'eo', 'eet', 'evas', 'ecore', 'ecore-evas', 'ecore-file', 'ecore-input', 'edje', 'ethumb-client', 'emotion', 'ecore-imf', 'ecore-con', 'eldbus', 'efreet', 'efreet-mime', 'efreet-trash', 'eio', 'elocation'], ['atspi']],
302['efl_wl' ,['wl'] , false, true, true, false, false, false, ['evas', 'ecore'], []], 301['efl_wl' ,['wl'] , false, true, true, false, false, false, ['evas', 'ecore'], []],
303['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []], 302['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []],
304['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []], 303['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []],
diff --git a/src/bin/elementary/test_gfx_filters.c b/src/bin/elementary/test_gfx_filters.c
index 47e83d7..eee77af 100644
--- a/src/bin/elementary/test_gfx_filters.c
+++ b/src/bin/elementary/test_gfx_filters.c
@@ -491,7 +491,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
491 491
492 // Experimental textblock support 492 // Experimental textblock support
493 o = tb = evas_object_textblock_add(evas_object_evas_get(win)); 493 o = tb = evas_object_textblock_add(evas_object_evas_get(win));
494 efl_event_callback_add(o, EFL_CANVAS_TEXT_EVENT_STYLE_INSETS_CHANGED, _textblock_resize, NULL); 494 efl_event_callback_add(o, EFL_CANVAS_TEXTBLOCK_EVENT_STYLE_INSETS_CHANGED, _textblock_resize, NULL);
495 efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _textblock_resize, NULL); 495 efl_event_callback_add(o, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _textblock_resize, NULL);
496 Evas_Textblock_Style *st = evas_textblock_style_new(); 496 Evas_Textblock_Style *st = evas_textblock_style_new();
497 evas_textblock_style_set(st, "DEFAULT='font=Sans font_size=20 color=#FFF wrap=word'"); 497 evas_textblock_style_set(st, "DEFAULT='font=Sans font_size=20 color=#FFF wrap=word'");
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index abd5368..a4289af 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -141,8 +141,8 @@ struct pack_event_info_and_call_visitor
141 mutable OutputIterator sink; 141 mutable OutputIterator sink;
142 Context const* context; 142 Context const* context;
143 attributes::type_def const& type; 143 attributes::type_def const& type;
144 144 std::string library_name;
145 static auto constexpr native_call = "Efl.Eo.Globals.CallEventCallback(this.NativeHandle, desc, info);\n"; 145 std::string evt_c_name;
146 146
147 typedef pack_event_info_and_call_visitor<OutputIterator, Context> visitor_type; 147 typedef pack_event_info_and_call_visitor<OutputIterator, Context> visitor_type;
148 typedef bool result_type; 148 typedef bool result_type;
@@ -157,15 +157,7 @@ struct pack_event_info_and_call_visitor
157 { 157 {
158 return as_generator( 158 return as_generator(
159 indent << "IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));\n" 159 indent << "IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));\n"
160 << indent << "try\n" 160 << indent << "CallNativeEventCallback(" + library_name + ", \"_" + evt_c_name + "\", info, " << "(p) => Marshal.FreeHGlobal(p));\n"
161 << indent << "{\n"
162 << indent << scope_tab << "Marshal.StructureToPtr(e.arg, info, false);\n"
163 << indent << scope_tab << this->native_call
164 << indent << "}\n"
165 << indent << "finally\n"
166 << indent << "{\n"
167 << indent << scope_tab << "Marshal.FreeHGlobal(info);\n"
168 << indent << "}\n"
169 ).generate(sink, attributes::unused, *context); 161 ).generate(sink, attributes::unused, *context);
170 } 162 }
171 163
@@ -192,14 +184,8 @@ struct pack_event_info_and_call_visitor
192 { 184 {
193 return as_generator( 185 return as_generator(
194 indent << "IntPtr info = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(" << conversion << ");\n" 186 indent << "IntPtr info = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(" << conversion << ");\n"
195 << indent << "try\n" 187 << indent << "CallNativeEventCallback(" + library_name + ", \"_" + evt_c_name + "\", info, " << "(p) => Eina.MemoryNative.Free(p));\n"
196 << indent << "{\n" 188 ).generate(sink, attributes::unused, *context);
197 << indent << scope_tab << this->native_call
198 << indent << "}\n"
199 << indent << "finally\n"
200 << indent << "{\n"
201 << indent << scope_tab << "Eina.MemoryNative.Free(info);\n"
202 << indent << "}\n").generate(sink, attributes::unused, *context);
203 }; 189 };
204 190
205 if (eina::optional<bool> b = call_match(str_table, filter_func, str_accept_func)) 191 if (eina::optional<bool> b = call_match(str_table, filter_func, str_accept_func))
@@ -216,14 +202,8 @@ struct pack_event_info_and_call_visitor
216 { 202 {
217 return as_generator( 203 return as_generator(
218 indent << "IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(" << conversion << ");\n" 204 indent << "IntPtr info = Eina.PrimitiveConversion.ManagedToPointerAlloc(" << conversion << ");\n"
219 << indent << "try\n" 205 << indent << "CallNativeEventCallback(" + library_name + ", \"_" + evt_c_name + "\", info, " << "(p) => Marshal.FreeHGlobal(p));\n"
220 << indent << "{\n" 206 ).generate(sink, attributes::unused, *context);
221 << indent << scope_tab << this->native_call
222 << indent << "}\n"
223 << indent << "finally\n"
224 << indent << "{\n"
225 << indent << scope_tab << "Marshal.FreeHGlobal(info);\n"
226 << indent << "}\n").generate(sink, attributes::unused, *context);
227 }; 207 };
228 208
229 if (eina::optional<bool> b = call_match(value_table, filter_func, value_accept_func)) 209 if (eina::optional<bool> b = call_match(value_table, filter_func, value_accept_func))
@@ -235,13 +215,15 @@ struct pack_event_info_and_call_visitor
235 { 215 {
236 auto const& indent = current_indentation(*context); 216 auto const& indent = current_indentation(*context);
237 return as_generator(indent << "IntPtr info = e.arg.NativeHandle;\n" 217 return as_generator(indent << "IntPtr info = e.arg.NativeHandle;\n"
238 << indent << this->native_call).generate(sink, attributes::unused, *context); 218 << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
219 ).generate(sink, attributes::unused, *context);
239 } 220 }
240 bool operator()(attributes::complex_type_def const&) const 221 bool operator()(attributes::complex_type_def const&) const
241 { 222 {
242 auto const& indent = current_indentation(*context); 223 auto const& indent = current_indentation(*context);
243 return as_generator(indent << "IntPtr info = e.arg.Handle;\n" 224 return as_generator(indent << "IntPtr info = e.arg.Handle;\n"
244 << indent << this->native_call).generate(sink, attributes::unused, *context); 225 << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", IntPtr.Zero, null);\n"
226 ).generate(sink, attributes::unused, *context);
245 } 227 }
246}; 228};
247 229
@@ -367,6 +349,7 @@ struct event_definition_generator
367 if (blacklist::is_event_blacklisted(evt, context)) 349 if (blacklist::is_event_blacklisted(evt, context))
368 return true; 350 return true;
369 351
352 auto library_name = context_find_tag<library_context>(context).actual_library_name(klass.filename);
370 std::string managed_evt_name = name_helpers::managed_event_name(evt.name); 353 std::string managed_evt_name = name_helpers::managed_event_name(evt.name);
371 auto const& indent = current_indentation(context); 354 auto const& indent = current_indentation(context);
372 355
@@ -396,7 +379,7 @@ struct event_definition_generator
396 if (!etype.is_engaged()) 379 if (!etype.is_engaged())
397 { 380 {
398 auto event_call_site_sink = std::back_inserter(event_native_call); 381 auto event_call_site_sink = std::back_inserter(event_native_call);
399 if (!as_generator(indent.inc().inc() << "Efl.Eo.Globals.CallEventCallback(this.NativeHandle, desc, IntPtr.Zero);\n") 382 if (!as_generator(indent.inc().inc() << "CallNativeEventCallback(" << library_name << ", \"_" << utils::to_uppercase(evt.c_name) << "\", IntPtr.Zero, null);\n")
400 .generate(event_call_site_sink, attributes::unused, context)) 383 .generate(event_call_site_sink, attributes::unused, context))
401 return false; 384 return false;
402 } 385 }
@@ -417,7 +400,7 @@ struct event_definition_generator
417 if (!(*etype).original_type.visit(unpack_event_args_visitor<decltype(arg_initializer_sink), decltype(sub_context)>{arg_initializer_sink, &sub_context, *etype})) 400 if (!(*etype).original_type.visit(unpack_event_args_visitor<decltype(arg_initializer_sink), decltype(sub_context)>{arg_initializer_sink, &sub_context, *etype}))
418 return false; 401 return false;
419 402
420 if (!(*etype).original_type.visit(pack_event_info_and_call_visitor<decltype(event_call_site_sink), decltype(sub_context)>{event_call_site_sink, &sub_context, *etype})) 403 if (!(*etype).original_type.visit(pack_event_info_and_call_visitor<decltype(event_call_site_sink), decltype(sub_context)>{event_call_site_sink, &sub_context, *etype, library_name, utils::to_uppercase(evt.c_name)}))
421 return false; 404 return false;
422 405
423 arg_initializer += " }"; 406 arg_initializer += " }";
@@ -508,18 +491,20 @@ struct event_definition_generator
508 } 491 }
509 } 492 }
510 493
494 // Close summary
495 if (!as_generator(scope_tab << "/// </summary>\n").generate(sink, nullptr, context))
496 return false;
497
498 if (evt.type.is_engaged())
499 {
500 if (!as_generator(scope_tab << "/// <param name=\"e\">Event to raise.</param>\n"
501 ).generate(sink, nullptr, context))
502 return false;
503 }
504
511 if (!as_generator( 505 if (!as_generator(
512 scope_tab << "/// </summary>\n" 506 scope_tab << (is_concrete ? "public" : "protected virtual") << " void On" << event_name << "(" << (!evt.type.is_engaged() ? "" : event_args_type + " e") << ")\n"
513 << scope_tab << "/// <param name=\"e\">Event to raise.</param>\n"
514 << scope_tab << (is_concrete ? "public" : "protected virtual") << " void On" << event_name << "(" << event_args_type << " e)\n"
515 << scope_tab << "{\n" 507 << scope_tab << "{\n"
516 << scope_tab << scope_tab << "var key = \"_" << upper_c_name << "\";\n"
517 << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative(" << library_name << ", key);\n"
518 << scope_tab << scope_tab << "if (desc == IntPtr.Zero)\n"
519 << scope_tab << scope_tab << "{\n"
520 << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Failed to get native event {key}\");\n"
521 << scope_tab << scope_tab << scope_tab << "return;\n"
522 << scope_tab << scope_tab << "}\n\n"
523 << event_native_call 508 << event_native_call
524 << scope_tab << "}\n\n" 509 << scope_tab << "}\n\n"
525 ).generate(sink, nullptr, context)) 510 ).generate(sink, nullptr, context))
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 653acc7..9108ed9 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -300,6 +300,7 @@ struct klass
300 documentation 300 documentation
301 << "[" << name_helpers::klass_full_native_inherit_name(cls) << "]\n" 301 << "[" << name_helpers::klass_full_native_inherit_name(cls) << "]\n"
302 << "[Efl.Eo.BindingEntity]\n" 302 << "[Efl.Eo.BindingEntity]\n"
303 << "[SuppressMessage(\"Microsoft.Naming\", \"CA1724:TypeNamesShouldNotMatchNamespaces\")]\n"
303 << "public " 304 << "public "
304 << (is_partial 305 << (is_partial
305 ? class_type == "class" 306 ? class_type == "class"
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
index 0811451..90da376 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
@@ -28,15 +28,15 @@ namespace eina = efl::eina;
28 28
29namespace detail { 29namespace detail {
30 30
31template <typename Array, typename F, int N, typename A> 31template <typename Array, typename SelectionPredicate, int N, typename AcceptFunc>
32eina::optional<bool> call_annotation_match(Array const (&array)[N], F f, A a) 32eina::optional<bool> call_annotation_match(Array const (&array)[N], SelectionPredicate predicate, AcceptFunc acceptFunc)
33{ 33{
34 typedef Array const* iterator_type; 34 typedef Array const* iterator_type;
35 iterator_type match_iterator = &array[0], match_last = match_iterator + N; 35 iterator_type match_iterator = &array[0], match_last = match_iterator + N;
36 match_iterator = std::find_if(match_iterator, match_last, f); 36 match_iterator = std::find_if(match_iterator, match_last, predicate);
37 if(match_iterator != match_last) 37 if(match_iterator != match_last)
38 { 38 {
39 return a(match_iterator->function()); 39 return acceptFunc(match_iterator->function());
40 } 40 }
41 return {nullptr}; 41 return {nullptr};
42} 42}
@@ -63,103 +63,108 @@ struct marshall_annotation_visitor_generate
63 eina::optional<bool> has_own; 63 eina::optional<bool> has_own;
64 std::function<std::string()> function; 64 std::function<std::string()> function;
65 }; 65 };
66 // These two tables are currently the same but will hold different marshallers
67 // for @in and @out/return semantics in a future commit.
66 match const parameter_match_table[] = 68 match const parameter_match_table[] =
67 { 69 {
68 // signed primitives 70 // signed primitives
69 {"bool", nullptr, [&] { return "[MarshalAs(UnmanagedType.U1)]"; }}, 71 {"bool", nullptr, [] { return "MarshalAs(UnmanagedType.U1)"; }},
70 {"string", true, [&] { 72 {"string", true, [] {
71 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]"; 73 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))";
72 }}, 74 }},
73 {"string", false, [&] { 75 {"string", false, [] {
74 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]"; 76 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))";
75 }}, 77 }},
76 {"mstring", true, [&] { 78 {"mstring", true, [] {
77 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]"; 79 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))";
78 }}, 80 }},
79 {"mstring", false, [&] { 81 {"mstring", false, [] {
80 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]"; 82 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))";
81 }}, 83 }},
82 {"stringshare", true, [&] { 84 {"stringshare", true, [] {
83 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]"; 85 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))";
84 }}, 86 }},
85 {"stringshare", false, [&] { 87 {"stringshare", false, [] {
86 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]"; 88 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))";
87 }}, 89 }},
88 {"any_value_ref", true, [&] { 90 {"any_value_ref", true, [] {
89 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]"; 91 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))";
90 }}, 92 }},
91 {"any_value_ref", false, [&] { 93 {"any_value_ref", false, [] {
92 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]"; 94 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))";
93 }}, 95 }},
94 {"strbuf", true, [&] { 96 {"strbuf", true, [] {
95 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]"; 97 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))";
96 }}, 98 }},
97 {"strbuf", false, [&] { 99 {"strbuf", false, [] {
98 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]"; 100 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))";
99 }}, 101 }},
100 {"Value_Type", false, [&] { 102 {"Value_Type", false, [] {
101 return "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueTypeMarshaler))]"; 103 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueTypeMarshaler))";
102 }}, 104 }},
103 }; 105 };
104 match const return_match_table[] = 106 match const return_match_table[] =
105 { 107 {
106 // signed primitives 108 // signed primitives
107 {"bool", nullptr, [&] { return "[return: MarshalAs(UnmanagedType.U1)]"; }}, 109 {"bool", nullptr, [] { return "MarshalAs(UnmanagedType.U1)"; }},
108 {"string", true, [&] { 110 {"string", true, [] {
109 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]"; 111 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))";
110 }}, 112 }},
111 {"string", nullptr, [&] { 113 {"string", false, [] {
112 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]"; 114 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))";
113 }}, 115 }},
114 {"mstring", true, [&] { 116 {"mstring", true, [] {
115 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]"; 117 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))";
116 }}, 118 }},
117 {"mstring", false, [&] { 119 {"mstring", false, [] {
118 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]"; 120 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))";
119 }}, 121 }},
120 {"stringshare", true, [&] { 122 {"stringshare", true, [] {
121 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]"; 123 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))";
122 }}, 124 }},
123 {"stringshare", false, [&] { 125 {"stringshare", false, [] {
124 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]"; 126 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))";
125 }}, 127 }},
126 {"any_value_ref", true, [&] { 128 {"any_value_ref", true, [] {
127 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))]"; 129 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshalerOwn))";
128 }}, 130 }},
129 {"any_value_ref", false, [&] { 131 {"any_value_ref", false, [] {
130 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]"; 132 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))";
131 }}, 133 }},
132 {"strbuf", true, [&] { 134 {"strbuf", true, [] {
133 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]"; 135 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))";
134 }}, 136 }},
135 {"strbuf", false, [&] { 137 {"strbuf", false, [] {
136 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]"; 138 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))";
137 }}, 139 }},
138 {"Value_Type", false, [&] { 140 {"Value_Type", false, [] {
139 return "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueTypeMarshaler))]"; 141 return "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueTypeMarshaler))";
140 }}, 142 }},
141 }; 143 };
142 144
143 if(eina::optional<bool> b = call_annotation_match 145 auto predicate = [&regular] (match const& m)
144 ((is_return ? return_match_table : parameter_match_table)
145 , [&] (match const& m)
146 { 146 {
147 return (!m.name || *m.name == regular.base_type) 147 return (!m.name || *m.name == regular.base_type)
148 && (!m.has_own || *m.has_own == (bool)(regular.base_qualifier & qualifier_info::is_own)) 148 && (!m.has_own || *m.has_own == (bool)(regular.base_qualifier & qualifier_info::is_own))
149 ; 149 ;
150 };
151
152 auto acceptCb = [this] (std::string const& marshalTag)
153 {
154 std::string prefix = is_return ? "return: " : "";
155 return as_generator("[" << prefix << marshalTag << "]").generate(sink, nullptr, *context);
156 };
157
158 const auto& match_table = is_return ? return_match_table : parameter_match_table;
159
160 if(eina::optional<bool> b = call_annotation_match(match_table, predicate, acceptCb))
161 {
162 return *b;
150 } 163 }
151 , [&] (std::string const& string) 164 else
152 { 165 {
153 std::copy(string.begin(), string.end(), sink); 166 return true;
154 return true; 167 }
155 }))
156 {
157 return *b;
158 }
159 else
160 {
161 return true;
162 }
163 } 168 }
164 bool operator()(attributes::klass_name const& klass_name) const 169 bool operator()(attributes::klass_name const& klass_name) const
165 { 170 {
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 70332c9..d83e91b 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -415,6 +415,7 @@ struct struct_definition_generator
415 ( 415 (
416 indent << "[StructLayout(LayoutKind.Sequential)]\n" 416 indent << "[StructLayout(LayoutKind.Sequential)]\n"
417 << indent << "[Efl.Eo.BindingEntity]\n" 417 << indent << "[Efl.Eo.BindingEntity]\n"
418 << "[SuppressMessage(\"Microsoft.Naming\", \"CA1724:TypeNamesShouldNotMatchNamespaces\")]\n"
418 << indent << "public struct " << struct_managed_name << " : IEquatable<" << struct_managed_name << ">\n" 419 << indent << "public struct " << struct_managed_name << " : IEquatable<" << struct_managed_name << ">\n"
419 << indent << "{\n" 420 << indent << "{\n"
420 ) 421 )
diff --git a/src/bindings/mono/eina_mono/eina_array.cs b/src/bindings/mono/eina_mono/eina_array.cs
index 7ebb7ed..ce26acd 100644
--- a/src/bindings/mono/eina_mono/eina_array.cs
+++ b/src/bindings/mono/eina_mono/eina_array.cs
@@ -147,12 +147,10 @@ public class Array<T> : IEnumerable<T>, IDisposable
147 [EditorBrowsable(EditorBrowsableState.Never)] 147 [EditorBrowsable(EditorBrowsableState.Never)]
148 public Array(IntPtr handle, bool own) 148 public Array(IntPtr handle, bool own)
149 { 149 {
150 if (handle == IntPtr.Zero) 150 Handle = (handle != IntPtr.Zero)
151 { 151 ? handle
152 throw new ArgumentNullException("handle", "Handle can't be null"); 152 : throw new ArgumentNullException(nameof(handle),
153 } 153 $"{nameof(Handle)} can't be null");
154
155 Handle = handle;
156 Own = own; 154 Own = own;
157 OwnContent = own; 155 OwnContent = own;
158 } 156 }
@@ -166,12 +164,10 @@ public class Array<T> : IEnumerable<T>, IDisposable
166 [EditorBrowsable(EditorBrowsableState.Never)] 164 [EditorBrowsable(EditorBrowsableState.Never)]
167 public Array(IntPtr handle, bool own, bool ownContent) 165 public Array(IntPtr handle, bool own, bool ownContent)
168 { 166 {
169 if (handle == IntPtr.Zero) 167 Handle = (handle != IntPtr.Zero)
170 { 168 ? handle
171 throw new ArgumentNullException("handle", "Handle can't be null"); 169 : throw new ArgumentNullException(nameof(handle),
172 } 170 $"{nameof(Handle)} can't be null");
173
174 Handle = handle;
175 Own = own; 171 Own = own;
176 OwnContent = ownContent; 172 OwnContent = ownContent;
177 } 173 }
diff --git a/src/bindings/mono/eldbus_mono/eldbus_common.cs b/src/bindings/mono/eldbus_mono/eldbus_common.cs
index 8d4a8ab..9d6a408 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_common.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_common.cs
@@ -18,6 +18,7 @@
18using System; 18using System;
19using System.Runtime.InteropServices; 19using System.Runtime.InteropServices;
20using System.ComponentModel; 20using System.ComponentModel;
21using System.Diagnostics.CodeAnalysis;
21 22
22using static eldbus.EldbusMessageNativeFunctions; 23using static eldbus.EldbusMessageNativeFunctions;
23 24
@@ -1543,6 +1544,7 @@ public delegate void MessageDelegate(eldbus.Message msg, eldbus.Pending pending)
1543/// Commons for eldbus. 1544/// Commons for eldbus.
1544/// <para>Since EFL 1.23.</para> 1545/// <para>Since EFL 1.23.</para>
1545/// </summary> 1546/// </summary>
1547[SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces")]
1546public static class Common 1548public static class Common
1547{ 1549{
1548 /// <summary> 1550 /// <summary>
diff --git a/src/bindings/mono/eldbus_mono/eldbus_connection.cs b/src/bindings/mono/eldbus_mono/eldbus_connection.cs
index c212060..ba54408 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_connection.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_connection.cs
@@ -298,7 +298,7 @@ public class Connection : IDisposable
298 298
299 if (msg == null) 299 if (msg == null)
300 { 300 {
301 throw new ArgumentNullException("msg"); 301 throw new ArgumentNullException(nameof(msg));
302 } 302 }
303 303
304 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr()); 304 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr());
@@ -347,7 +347,7 @@ public class Connection : IDisposable
347 347
348 if (bus == null) 348 if (bus == null)
349 { 349 {
350 throw new ArgumentNullException("bus"); 350 throw new ArgumentNullException(nameof(bus));
351 } 351 }
352 352
353 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr()); 353 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr());
@@ -376,7 +376,7 @@ public class Connection : IDisposable
376 376
377 if (bus == null) 377 if (bus == null)
378 { 378 {
379 throw new ArgumentNullException("bus"); 379 throw new ArgumentNullException(nameof(bus));
380 } 380 }
381 381
382 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr()); 382 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr());
@@ -405,7 +405,7 @@ public class Connection : IDisposable
405 405
406 if (bus == null) 406 if (bus == null)
407 { 407 {
408 throw new ArgumentNullException("bus"); 408 throw new ArgumentNullException(nameof(bus));
409 } 409 }
410 410
411 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr()); 411 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr());
@@ -434,7 +434,7 @@ public class Connection : IDisposable
434 434
435 if (bus == null) 435 if (bus == null)
436 { 436 {
437 throw new ArgumentNullException("bus"); 437 throw new ArgumentNullException(nameof(bus));
438 } 438 }
439 439
440 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr()); 440 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr());
@@ -533,7 +533,7 @@ public class Connection : IDisposable
533 533
534 if (bus == null) 534 if (bus == null)
535 { 535 {
536 throw new ArgumentNullException("bus"); 536 throw new ArgumentNullException(nameof(bus));
537 } 537 }
538 538
539 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr()); 539 IntPtr cb_wrapper = (dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr());
diff --git a/src/bindings/mono/eldbus_mono/eldbus_object.cs b/src/bindings/mono/eldbus_mono/eldbus_object.cs
index 329bd34..3c77d25 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_object.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_object.cs
@@ -146,17 +146,17 @@ public class Object : System.IDisposable
146 { 146 {
147 if (conn == null) 147 if (conn == null)
148 { 148 {
149 throw new System.ArgumentNullException("conn"); 149 throw new System.ArgumentNullException(nameof(conn));
150 } 150 }
151 151
152 if (bus == null) 152 if (bus == null)
153 { 153 {
154 throw new System.ArgumentNullException("bus"); 154 throw new System.ArgumentNullException(nameof(bus));
155 } 155 }
156 156
157 if (path == null) 157 if (path == null)
158 { 158 {
159 throw new System.ArgumentNullException("path"); 159 throw new System.ArgumentNullException(nameof(path));
160 } 160 }
161 161
162 var handle = eldbus_object_get(conn.Handle, bus, path); 162 var handle = eldbus_object_get(conn.Handle, bus, path);
@@ -316,7 +316,7 @@ public class Object : System.IDisposable
316 316
317 if (msg == null) 317 if (msg == null)
318 { 318 {
319 throw new System.ArgumentNullException("msg"); 319 throw new System.ArgumentNullException(nameof(msg));
320 } 320 }
321 321
322 IntPtr cb_wrapper = dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr(); 322 IntPtr cb_wrapper = dlgt == null ? IntPtr.Zero : eldbus.Common.GetMessageCbWrapperPtr();
diff --git a/src/bindings/mono/eldbus_mono/eldbus_proxy.cs b/src/bindings/mono/eldbus_mono/eldbus_proxy.cs
index 7fc48d3..a3a984d 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_proxy.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_proxy.cs
@@ -24,7 +24,7 @@ using static eldbus.EldbusProxyNativeFunctions;
24namespace eldbus 24namespace eldbus
25{ 25{
26 26
27[EditorBrowsable(EditorBrowsableState.Never)] 27[EditorBrowsable(EditorBrowsableState.Never)]
28internal static class EldbusProxyNativeFunctions 28internal static class EldbusProxyNativeFunctions
29{ 29{
30 [DllImport(efl.Libs.Eldbus)] public static extern IntPtr 30 [DllImport(efl.Libs.Eldbus)] public static extern IntPtr
@@ -215,7 +215,7 @@ public class Proxy : IDisposable
215 215
216 if (member == null) 216 if (member == null)
217 { 217 {
218 throw new ArgumentNullException("member"); 218 throw new ArgumentNullException(nameof(member));
219 } 219 }
220 220
221 var ptr = eldbus_proxy_method_call_new(Handle, member); 221 var ptr = eldbus_proxy_method_call_new(Handle, member);
@@ -233,7 +233,7 @@ public class Proxy : IDisposable
233 233
234 if (msg == null) 234 if (msg == null)
235 { 235 {
236 throw new ArgumentNullException("msg"); 236 throw new ArgumentNullException(nameof(msg));
237 } 237 }
238 238
239 // Native send() takes ownership of the message. We ref here to keep the IDisposable 239 // Native send() takes ownership of the message. We ref here to keep the IDisposable
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 554f4ec..7445df3 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -325,6 +325,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
325 } 325 }
326 } 326 }
327 } 327 }
328
328 internal Efl.EventCb GetInternalEventCallback<T>(EventHandler<T> handler, Func<IntPtr, T> createArgsInstance) where T:EventArgs 329 internal Efl.EventCb GetInternalEventCallback<T>(EventHandler<T> handler, Func<IntPtr, T> createArgsInstance) where T:EventArgs
329 { 330 {
330 return (IntPtr data, ref Efl.Event.NativeStruct evt) => 331 return (IntPtr data, ref Efl.Event.NativeStruct evt) =>
@@ -344,6 +345,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
344 } 345 }
345 }; 346 };
346 } 347 }
348
347 internal Efl.EventCb GetInternalEventCallback(EventHandler handler) 349 internal Efl.EventCb GetInternalEventCallback(EventHandler handler)
348 { 350 {
349 return (IntPtr data, ref Efl.Event.NativeStruct evt) => 351 return (IntPtr data, ref Efl.Event.NativeStruct evt) =>
@@ -364,6 +366,23 @@ public abstract class EoWrapper : IWrapper, IDisposable
364 }; 366 };
365 } 367 }
366 368
369 internal void CallNativeEventCallback(string lib, string key, IntPtr eventInfo, Action<IntPtr> freeAction)
370 {
371 try
372 {
373 IntPtr desc = Efl.EventDescription.GetNative(lib, key);
374 if (desc == IntPtr.Zero)
375 throw new ArgumentException($"Failed to get native event {key}", "key");
376
377 Efl.Eo.Globals.CallEventCallback(NativeHandle, desc, eventInfo);
378 }
379 finally
380 {
381 if (freeAction != null)
382 freeAction(eventInfo);
383 }
384 }
385
367 private static void OwnershipUniqueCallback(IntPtr data, ref Efl.Event.NativeStruct evt) 386 private static void OwnershipUniqueCallback(IntPtr data, ref Efl.Event.NativeStruct evt)
368 { 387 {
369 var ws = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data); 388 var ws = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data);
diff --git a/src/examples/elementary/efl_ui_unit_converter.cs b/src/examples/elementary/efl_ui_unit_converter.cs
index e870eeb..96481f5 100644
--- a/src/examples/elementary/efl_ui_unit_converter.cs
+++ b/src/examples/elementary/efl_ui_unit_converter.cs
@@ -73,9 +73,10 @@ public class Example
73 miles_label.SetSize(size); 73 miles_label.SetSize(size);
74 miles_label.SetVisible(true); 74 miles_label.SetVisible(true);
75 75
76 Efl.Ui.TextEditable miles_input = new Efl.Ui.TextEditable(miles_box); 76 Efl.Ui.Text miles_input = new Efl.Ui.Text(miles_box);
77 miles_input.SetText(""); 77 miles_input.SetText("");
78 miles_input.SetScrollable(true); 78 miles_input.SetScrollable(true);
79 miles_input.SetEditable(true);
79 miles_input.SetSize(size); 80 miles_input.SetSize(size);
80 miles_input.SetVisible(true); 81 miles_input.SetVisible(true);
81 82
diff --git a/src/examples/elementary/location_example_01.c b/src/examples/elementary/location_example_01.c
deleted file mode 100644
index 7b8ad6f..0000000
--- a/src/examples/elementary/location_example_01.c
+++ /dev/null
@@ -1,151 +0,0 @@
1//Compile with:
2//gcc -o location_example_01 location_example_01.c -g `pkg-config --cflags --libs elementary elocation`
3#ifndef EFL_BETA_API_SUPPORT
4# define EFL_BETA_API_SUPPORT
5#endif
6
7#include <Elementary.h>
8#ifdef ELM_ELOCATION
9#include <Elocation.h>
10#endif
11
12static Evas_Object *pos_label, *addr_label, *box, *win;
13
14#ifdef ELM_ELOCATION
15static void
16_print_position(Elocation_Position *position)
17{
18 char buffer[1024];
19
20 if (!position) return;
21 snprintf(buffer, sizeof(buffer),
22 "<b>### Position Detail ###</b><br/>"
23 "<b>GeoClue position reply with data from timestamp</b> %i<br/>"
24 "<b>Latitude:</b> %f<br/>"
25 "<b>Longitude:</b> %f<br/>"
26 "<b>Altitude:</b> %f<br/>"
27 "<b>Accuracy level:</b> %i<br/>"
28 "<b>Accuracy horizontal:</b> %f<br/>"
29 "<b>Accuracy vertical:</b> %f",
30 position->timestamp, position->latitude, position->longitude,
31 position->altitude, position->accur->level,
32 position->accur->horizontal, position->accur->vertical);
33 elm_object_text_set(pos_label, buffer);
34}
35
36static void
37_print_address(Elocation_Address *address)
38{
39 char buffer[1024];
40
41 if (!address) return;
42 snprintf(buffer, sizeof(buffer),
43 "<b>### Address Detail ###</b><br/>"
44 "<b>Address update with data from timestamp:</b> %i<br/>"
45 "<b>Country:</b> %s<br/>"
46 "<b>Countrycode:</b> %s<br/>"
47 "<b>Locality:</b> %s<br/>"
48 "<b>Postalcode:</b> %s<br/>"
49 "<b>Region:</b> %s<br/>"
50 "<b>Timezone:</b> %s<br/>"
51 "<b>Accuracy level:</b> %i<br/>"
52 "<b>Accuracy horizontal:</b> %f<br/>"
53 "<b>Accuracy vertical:</b> %f",
54 address->timestamp, address->country, address->countrycode,
55 address->locality, address->postalcode, address->region,
56 address->timezone, address->accur->level, address->accur->horizontal,
57 address->accur->vertical);
58 elm_object_text_set(addr_label, buffer);
59}
60
61static Eina_Bool
62_position_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
63{
64 Elocation_Position *position;
65
66 position = event;
67 _print_position(position);
68 return ECORE_CALLBACK_DONE;
69}
70
71static Eina_Bool
72_address_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
73{
74 Elocation_Address *address;
75
76 address = event;
77 _print_address(address);
78
79 return ECORE_CALLBACK_DONE;
80}
81#endif
82
83EAPI_MAIN int
84elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
85{
86#ifdef ELM_ELOCATION
87 Elocation_Address *address;
88 Elocation_Position *position;
89#endif
90
91 /* The program will proceed only if Ewebkit library is available. */
92 if (elm_need_elocation() == EINA_FALSE)
93 return -1;
94
95 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
96
97 win = elm_win_util_standard_add("elocation", "Elocation example");
98 elm_win_autodel_set(win, EINA_TRUE);
99
100 box = elm_box_add(win);
101 elm_win_resize_object_add(win, box);
102 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
103 evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
104
105 pos_label = elm_label_add(box);
106 elm_label_line_wrap_set(pos_label, ELM_WRAP_CHAR);
107 elm_object_text_set(pos_label, "Getting location ...");
108 evas_object_size_hint_weight_set(pos_label, EVAS_HINT_EXPAND, 0.0);
109 evas_object_size_hint_align_set(pos_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
110 elm_label_slide_mode_set(pos_label, ELM_LABEL_SLIDE_MODE_ALWAYS);
111 elm_box_pack_end(box, pos_label);
112 evas_object_show(pos_label);
113 elm_box_padding_set(box, 0, 50);
114
115 addr_label = elm_label_add(box);
116 elm_label_line_wrap_set(addr_label, ELM_WRAP_CHAR);
117 elm_object_text_set(addr_label, "Getting location ...");
118 evas_object_size_hint_weight_set(addr_label, EVAS_HINT_EXPAND, 0.0);
119 evas_object_size_hint_align_set(addr_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
120 elm_label_slide_mode_set(addr_label, ELM_LABEL_SLIDE_MODE_ALWAYS);
121 elm_box_pack_end(box, addr_label);
122 evas_object_show(addr_label);
123
124#ifdef ELM_ELOCATION
125 address = elocation_address_new();
126 position = elocation_position_new();
127
128 ecore_event_handler_add(ELOCATION_EVENT_POSITION, _position_changed, NULL);
129 ecore_event_handler_add(ELOCATION_EVENT_ADDRESS, _address_changed, NULL);
130
131 elocation_position_get(position);
132 _print_position(position);
133
134 elocation_address_get(address);
135 _print_address(address);
136#endif
137
138 evas_object_show(box);
139 evas_object_resize(win, 600, 480);
140 evas_object_show(win);
141
142 elm_run();
143
144#ifdef ELM_ELOCATION
145 elocation_position_free(position);
146 elocation_address_free(address);
147#endif
148
149 return 0;
150}
151ELM_MAIN()
diff --git a/src/examples/elementary/meson.build b/src/examples/elementary/meson.build
index 380d3ef..e88ddfe 100644
--- a/src/examples/elementary/meson.build
+++ b/src/examples/elementary/meson.build
@@ -59,7 +59,6 @@ examples = [
59 'list_example_01', 59 'list_example_01',
60 'list_example_02', 60 'list_example_02',
61 'list_example_03', 61 'list_example_03',
62 'location_example_01',
63 'map_example_01', 62 'map_example_01',
64 'map_example_02', 63 'map_example_02',
65 'map_example_03', 64 'map_example_03',
diff --git a/src/examples/elocation/.gitignore b/src/examples/elocation/.gitignore
deleted file mode 100644
index 5945c2e..0000000
--- a/src/examples/elocation/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
1/elocation
diff --git a/src/examples/elocation/elocation.c b/src/examples/elocation/elocation.c
deleted file mode 100644
index b9c8b99..0000000
--- a/src/examples/elocation/elocation.c
+++ /dev/null
@@ -1,167 +0,0 @@
1#include <stdio.h>
2
3#define EFL_BETA_API_SUPPORT
4
5#include <Ecore.h>
6#include <Elocation.h>
7
8/* A set of callbacks to react on incoming elocation events. They are standard
9 * ecore events and we register callbacks based on these events in the main
10 * function.
11 */
12static Eina_Bool
13status_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
14{
15 int *status = event;
16
17 printf("Status changed to: %i\n", *status);
18 printf("\n");
19
20 return ECORE_CALLBACK_DONE;
21}
22
23static Eina_Bool
24rgeocode_arrived(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
25{
26 Elocation_Address *address;
27
28 address = event;
29 printf("Geocode reply:\n");
30 printf("Country: %s\n", address->country);
31 printf("Countrycode: %s\n", address->countrycode);
32 printf("Locality: %s\n", address->locality);
33 printf("Postalcode: %s\n", address->postalcode);
34 printf("Region: %s\n", address->region);
35 printf("Timezone: %s\n", address->timezone);
36 printf("Accuracy level: %i\n", address->accur->level);
37 printf("Accuracy horizontal: %f\n", address->accur->horizontal);
38 printf("Accuracy vertical: %f\n", address->accur->vertical);
39 printf("\n");
40
41 return ECORE_CALLBACK_DONE;
42}
43
44static Eina_Bool
45geocode_arrived(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
46{
47 Elocation_Position *position;
48
49 position = event;
50 printf("Reverse geocode reply:\n");
51 printf("Latitude:\t %f\n", position->latitude);
52 printf("Longitude:\t %f\n", position->longitude);
53 printf("Altitude:\t %f\n", position->altitude);
54 printf("Accuracy level: %i\n", position->accur->level);
55 printf("Accuracy horizontal: %f\n", position->accur->horizontal);
56 printf("Accuracy vertical: %f\n", position->accur->vertical);
57 printf("\n");
58
59 return ECORE_CALLBACK_DONE;
60}
61
62static Eina_Bool
63address_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
64{
65 Elocation_Address *address;
66
67 address = event;
68 printf("Address update with data from timestamp: %i\n", address->timestamp);
69 printf("Country: %s\n", address->country);
70 printf("Countrycode: %s\n", address->countrycode);
71 printf("Locality: %s\n", address->locality);
72 printf("Postalcode: %s\n", address->postalcode);
73 printf("Region: %s\n", address->region);
74 printf("Timezone: %s\n", address->timezone);
75 printf("Accuracy level: %i\n", address->accur->level);
76 printf("Accuracy horizontal: %f\n", address->accur->horizontal);
77 printf("Accuracy vertical: %f\n", address->accur->vertical);
78 printf("\n");
79
80 return ECORE_CALLBACK_DONE;
81}
82
83static Eina_Bool
84position_changed(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *event)
85{
86 Elocation_Position *position;
87
88 position = event;
89 printf("GeoClue position reply with data from timestamp %i\n", position->timestamp);
90 printf("Latitude:\t %f\n", position->latitude);
91 printf("Longitude:\t %f\n", position->longitude);
92 printf("Altitude:\t %f\n", position->altitude);
93 printf("Accuracy level: %i\n", position->accur->level);
94 printf("Accuracy horizontal: %f\n", position->accur->horizontal);
95 printf("Accuracy vertical: %f\n", position->accur->vertical);
96 printf("\n");
97
98 return ECORE_CALLBACK_DONE;
99}
100
101int
102main(void)
103{
104 Elocation_Address *address, *addr_geocode;
105 Elocation_Position *position, *pos_geocode;
106 int status;
107
108 /* Init the needed efl subsystems so we can safely use them */
109 ecore_init();
110 eldbus_init();
111 elocation_init();
112
113 /* Create an address and positon object that we use for all our operations.
114 * Needs to be freed manually with elocation_*_free when we now longer use
115 * them */
116 address = elocation_address_new();
117 position = elocation_position_new();
118
119 /* Register callback so we get updates later on */
120 ecore_event_handler_add(ELOCATION_EVENT_STATUS, status_changed, NULL);
121 ecore_event_handler_add(ELOCATION_EVENT_POSITION, position_changed, NULL);
122 ecore_event_handler_add(ELOCATION_EVENT_ADDRESS, address_changed, NULL);
123 ecore_event_handler_add(ELOCATION_EVENT_GEOCODE, geocode_arrived, NULL);
124 ecore_event_handler_add(ELOCATION_EVENT_REVERSEGEOCODE, rgeocode_arrived, NULL);
125
126 /* To the initial request for status address and position. This fills in the
127 * objects with the data from GeoClue */
128 elocation_status_get(&status);
129 elocation_position_get(position);
130 elocation_address_get(address);
131
132 /* Another set of address and position object. This time for demonstrating
133 * the GeoCode functionalities */
134 addr_geocode = elocation_address_new();
135 pos_geocode = elocation_position_new();
136
137 /* The Freeform API could use any string to transform it into position
138 * coordinates. How good that works depends on the used GeoClue provider */
139 elocation_freeform_address_to_position("London", pos_geocode);
140
141 /* Some demo values to show the position to address conversion */
142 pos_geocode->latitude = 51.7522;
143 pos_geocode->longitude = -1.25596;
144 pos_geocode->accur->level = 3;
145 elocation_position_to_address(pos_geocode, addr_geocode);
146
147 /* And now from address to position */
148 addr_geocode->locality = "Cambridge";
149 addr_geocode->countrycode = "UK";
150 elocation_address_to_position(addr_geocode, pos_geocode);
151
152 /* Enter the mainloop now that we are setup with initial data and waiting for
153 * events. */
154 ecore_main_loop_begin();
155
156 /* Cleanup allocated memory now that we shut down */
157 elocation_address_free(addr_geocode);
158 elocation_position_free(pos_geocode);
159 elocation_address_free(address);
160 elocation_position_free(position);
161
162 /* Make sure we also shut down the initialized subsystems */
163 elocation_shutdown();
164 eldbus_shutdown();
165 ecore_shutdown();
166 return 0;
167}
diff --git a/src/examples/evas/efl-canvas-vg-simple.c b/src/examples/evas/efl-canvas-vg-simple.c
index 36bdfcb..79a9645 100644
--- a/src/examples/evas/efl-canvas-vg-simple.c
+++ b/src/examples/evas/efl-canvas-vg-simple.c
@@ -43,6 +43,8 @@ Ecore_Animator *animator;
43 * the end of the path. 43 * the end of the path.
44 */ 44 */
45static const char *batman = "M 256,213 C 245,181 206,187 234,262 147,181 169,71.2 233,18 220,56 235,81 283,88 285,78.7 286,69.3 288,60 289,61.3 290,62.7 291,64 291,64 297,63 300,63 303,63 309,64 309,64 310,62.7 311,61.3 312,60 314,69.3 315,78.7 317,88 365,82 380,56 367,18 431,71 453,181 366,262 394,187 356,181 344,213 328,185 309,184 300,284 291,184 272,185 256,213 Z"; 45static const char *batman = "M 256,213 C 245,181 206,187 234,262 147,181 169,71.2 233,18 220,56 235,81 283,88 285,78.7 286,69.3 288,60 289,61.3 290,62.7 291,64 291,64 297,63 300,63 303,63 309,64 309,64 310,62.7 311,61.3 312,60 314,69.3 315,78.7 317,88 365,82 380,56 367,18 431,71 453,181 366,262 394,187 356,181 344,213 328,185 309,184 300,284 291,184 272,185 256,213 Z";
46static const unsigned int batman_commandCnt = 17;
47static const unsigned int batman_pointCnt = 86;
46static const char *morph1[2] = {"M 0,0 L 0,0 L 100,0 L 100,0 L 100,100 L 100,100 L 0,100 L 0,100 L 0,0", 48static const char *morph1[2] = {"M 0,0 L 0,0 L 100,0 L 100,0 L 100,100 L 100,100 L 0,100 L 0,100 L 0,0",
47 "M 0,0 L 50,-80 L 100,0 L 180,50 L 100,100 L 50,180 L 0,100 L -80,50 L 0,0"}; 49 "M 0,0 L 50,-80 L 100,0 L 180,50 L 100,100 L 50,180 L 0,100 L -80,50 L 0,0"};
48 50
@@ -422,7 +424,7 @@ _2_interpolation_test()
422{ 424{
423 anim_index = 0; 425 anim_index = 0;
424 426
425 Efl_VG *shape; 427 Efl_VG *shape, *container;
426 428
427 reset_test(); 429 reset_test();
428 430
@@ -430,13 +432,19 @@ _2_interpolation_test()
430 animator = ecore_animator_timeline_add(1, _interpolation_keyframe, NULL); 432 animator = ecore_animator_timeline_add(1, _interpolation_keyframe, NULL);
431 puts(interpolation_menu); 433 puts(interpolation_menu);
432 434
435 // Make Efl.Canvas.Vg.Container Object
436 container = efl_add(EFL_CANVAS_VG_CONTAINER_CLASS, d.vg);
437 // Set the root node of Efl.Canvas.Vg.Object
438 // The Efl.Canvas.Vg.Object searches and renders
439 // Efl.Canvas.Vg.Node(Shape, Container, etc...) from set root node.
440 efl_canvas_vg_object_root_node_set(d.vg, container);
441
433 //Interpolation 'from' and 'to' Object 442 //Interpolation 'from' and 'to' Object
434 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, d.vg, 443 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, d.vg,
435 efl_gfx_path_append_svg_path(efl_added, morph1[0]), // Set SVG path 444 efl_gfx_path_append_svg_path(efl_added, morph1[0]), // Set SVG path
436 efl_gfx_shape_stroke_color_set(efl_added, 255, 0, 0, 255), 445 efl_gfx_shape_stroke_color_set(efl_added, 255, 0, 0, 255),
437 efl_gfx_shape_stroke_width_set(efl_added, 5), 446 efl_gfx_shape_stroke_width_set(efl_added, 5),
438 efl_canvas_vg_node_origin_set(efl_added, 100, 100) 447 efl_canvas_vg_node_origin_set(efl_added, 100, 100));
439);
440 d.shape_list = eina_list_append(d.shape_list, shape); 448 d.shape_list = eina_list_append(d.shape_list, shape);
441 449
442 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, d.vg, 450 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, d.vg,
@@ -447,17 +455,15 @@ _2_interpolation_test()
447 d.shape_list = eina_list_append(d.shape_list, shape); 455 d.shape_list = eina_list_append(d.shape_list, shape);
448 456
449 // Base Object 457 // Base Object
450 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, d.vg); 458 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, container);
451 d.shape_list = eina_list_append(d.shape_list, shape); 459 d.shape_list = eina_list_append(d.shape_list, shape);
452 460
453 efl_canvas_vg_object_root_node_set(d.vg, shape);
454} 461}
455 462
456// 2. Interpolation Test Case END 463// 2. Interpolation Test Case END
457 464
458 465
459// 3. Gradient Test Case START 466// 3. Gradient Test Case START
460
461static void 467static void
462_gradient_key_handle(void *data EINA_UNUSED, const Efl_Event *ev) 468_gradient_key_handle(void *data EINA_UNUSED, const Efl_Event *ev)
463{ 469{
@@ -559,7 +565,7 @@ _3_gradient_test()
559static void 565static void
560_main_menu() 566_main_menu()
561{ 567{
562 Efl_VG *shape; 568 Efl_VG *shape, *container;
563 if (animator) ecore_animator_del(animator); 569 if (animator) ecore_animator_del(animator);
564 animator = NULL; 570 animator = NULL;
565 if(d.vg) efl_del(d.vg); 571 if(d.vg) efl_del(d.vg);
@@ -575,18 +581,23 @@ _main_menu()
575 d.vg = efl_add(EFL_CANVAS_VG_OBJECT_CLASS, d.evas, 581 d.vg = efl_add(EFL_CANVAS_VG_OBJECT_CLASS, d.evas,
576 efl_gfx_entity_visible_set(efl_added, EINA_TRUE)); 582 efl_gfx_entity_visible_set(efl_added, EINA_TRUE));
577 583
584 // Make Efl.Canvas.Vg.Container Object
585 container = efl_add(EFL_CANVAS_VG_CONTAINER_CLASS, d.vg);
586 // Set the root node of Efl.Canvas.Vg.Object
587 // The Efl.Canvas.Vg.Object searches and renders
588 // Efl.Canvas.Vg.Node(Shape, Container, etc...) from set root node.
589 efl_canvas_vg_object_root_node_set(d.vg, container);
590
578 // Make Efl.Canvas.Vg.Shape 591 // Make Efl.Canvas.Vg.Shape
579 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, d.vg, 592 shape = efl_add(EFL_CANVAS_VG_SHAPE_CLASS, container,
580 efl_gfx_path_append_svg_path(efl_added, batman), // Set SVG path
581 efl_gfx_shape_stroke_color_set(efl_added, 255, 0, 0, 255), // Set Stroke color 593 efl_gfx_shape_stroke_color_set(efl_added, 255, 0, 0, 255), // Set Stroke color
582 efl_gfx_shape_stroke_width_set(efl_added, 5), // Set Stroke width 594 efl_gfx_shape_stroke_width_set(efl_added, 5), // Set Stroke width
583 efl_gfx_color_set(efl_added, 255, 255, 0, 255), // Set Fill color 595 efl_gfx_color_set(efl_added, 255, 255, 0, 255), // Set Fill color
584 efl_canvas_vg_node_origin_set(efl_added, 25, 100)); // Set Position 596 efl_canvas_vg_node_origin_set(efl_added, 25, 100)); // Set Position
585 597
586 // Set the root node of Efl.Canvas.Vg.Object 598 // Reserve memory for the number of commands and pointers
587 // The Efl.Canvas.Vg.Object searches and renders 599 efl_gfx_path_reserve(shape, batman_commandCnt, batman_pointCnt);
588 // Efl.Canvas.Vg.Node(Shape, Container, etc...) from set root node. 600 efl_gfx_path_append_svg_path(shape, batman); // Set SVG path
589 efl_canvas_vg_object_root_node_set(d.vg, shape);
590 601
591 _canvas_resize_cb(d.ee); 602 _canvas_resize_cb(d.ee);
592 puts(main_menu); 603 puts(main_menu);
diff --git a/src/lib/ecore_x/ecore_x_gesture.c b/src/lib/ecore_x/ecore_x_gesture.c
index 4c68590..643d728 100644
--- a/src/lib/ecore_x/ecore_x_gesture.c
+++ b/src/lib/ecore_x/ecore_x_gesture.c
@@ -18,30 +18,30 @@ ecore_x_gesture_supported(void)
18} 18}
19 19
20EAPI Eina_Bool 20EAPI Eina_Bool
21ecore_x_gesture_events_select(Ecore_X_Window win, 21ecore_x_gesture_events_select(Ecore_X_Window win EINA_UNUSED,
22 Ecore_X_Gesture_Event_Mask mask) 22 Ecore_X_Gesture_Event_Mask mask EINA_UNUSED)
23{ 23{
24 return EINA_FALSE; 24 return EINA_FALSE;
25} 25}
26 26
27EAPI Ecore_X_Gesture_Event_Mask 27EAPI Ecore_X_Gesture_Event_Mask
28ecore_x_gesture_events_selected_get(Ecore_X_Window win) 28ecore_x_gesture_events_selected_get(Ecore_X_Window win EINA_UNUSED)
29{ 29{
30 return ECORE_X_GESTURE_EVENT_MASK_NONE; 30 return ECORE_X_GESTURE_EVENT_MASK_NONE;
31} 31}
32 32
33EAPI Eina_Bool 33EAPI Eina_Bool
34ecore_x_gesture_event_grab(Ecore_X_Window win, 34ecore_x_gesture_event_grab(Ecore_X_Window win EINA_UNUSED,
35 Ecore_X_Gesture_Event_Type type, 35 Ecore_X_Gesture_Event_Type type EINA_UNUSED,
36 int num_fingers) 36 int num_fingers EINA_UNUSED)
37{ 37{
38 return EINA_FALSE; 38 return EINA_FALSE;
39} 39}
40 40
41EAPI Eina_Bool 41EAPI Eina_Bool
42ecore_x_gesture_event_ungrab(Ecore_X_Window win, 42ecore_x_gesture_event_ungrab(Ecore_X_Window win EINA_UNUSED,
43 Ecore_X_Gesture_Event_Type type, 43 Ecore_X_Gesture_Event_Type type EINA_UNUSED,
44 int num_fingers) 44 int num_fingers EINA_UNUSED)
45{ 45{
46 return EINA_FALSE; 46 return EINA_FALSE;
47} 47}
diff --git a/src/lib/edje/edje_textblock.c b/src/lib/edje/edje_textblock.c
index 8b9d97e..76f3b2a 100644
--- a/src/lib/edje/edje_textblock.c
+++ b/src/lib/edje/edje_textblock.c
@@ -62,10 +62,10 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
62 if (!minx2) 62 if (!minx2)
63 { 63 {
64 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(TO_INT(params->eval.w), TO_INT(params->eval.h))); 64 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(TO_INT(params->eval.w), TO_INT(params->eval.h)));
65 size = efl_canvas_text_size_formatted_get(ep->object); 65 size = efl_canvas_textblock_size_formatted_get(ep->object);
66 } 66 }
67 else 67 else
68 size = efl_canvas_text_size_native_get(ep->object); 68 size = efl_canvas_textblock_size_native_get(ep->object);
69 evas_object_textblock_style_insets_get(ep->object, &ins_l, 69 evas_object_textblock_style_insets_get(ep->object, &ins_l,
70 &ins_r, &ins_t, &ins_b); 70 &ins_r, &ins_t, &ins_b);
71 mw = ins_l + size.w + ins_r; 71 mw = ins_l + size.w + ins_r;
@@ -88,10 +88,10 @@ _edje_part_recalc_single_textblock_min_max_calc_legacy(Edje_Real_Part *ep,
88 if (!maxx2) 88 if (!maxx2)
89 { 89 {
90 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(TO_INT(params->eval.w), TO_INT(params->eval.h))); 90 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(TO_INT(params->eval.w), TO_INT(params->eval.h)));
91 size = efl_canvas_text_size_formatted_get(ep->object); 91 size = efl_canvas_textblock_size_formatted_get(ep->object);
92 } 92 }
93 else 93 else
94 size = efl_canvas_text_size_native_get(ep->object); 94 size = efl_canvas_textblock_size_native_get(ep->object);
95 evas_object_textblock_style_insets_get(ep->object, &ins_l, &ins_r, 95 evas_object_textblock_style_insets_get(ep->object, &ins_l, &ins_r,
96 &ins_t, &ins_b); 96 &ins_t, &ins_b);
97 mw = ins_l + size.w + ins_r; 97 mw = ins_l + size.w + ins_r;
@@ -180,7 +180,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
180 if (temp_w > 0) 180 if (temp_w > 0)
181 { 181 {
182 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h)); 182 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
183 size = efl_canvas_text_size_formatted_get(ep->object); 183 size = efl_canvas_textblock_size_formatted_get(ep->object);
184 tw = size.w; 184 tw = size.w;
185 th = size.h; 185 th = size.h;
186 186
@@ -189,7 +189,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
189 } 189 }
190 else 190 else
191 { 191 {
192 size = efl_canvas_text_size_native_get(ep->object); 192 size = efl_canvas_textblock_size_native_get(ep->object);
193 th = size.h; 193 th = size.h;
194 194
195 th += ins_t + ins_b; 195 th += ins_t + ins_b;
@@ -221,7 +221,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
221 } 221 }
222 222
223 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h)); 223 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
224 size = efl_canvas_text_size_formatted_get(ep->object); 224 size = efl_canvas_textblock_size_formatted_get(ep->object);
225 tw = size.w; 225 tw = size.w;
226 th = size.h; 226 th = size.h;
227 227
@@ -232,7 +232,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
232 * don't get meaningless height for multiline */ 232 * don't get meaningless height for multiline */
233 if (temp_w <= 0) 233 if (temp_w <= 0)
234 { 234 {
235 size = efl_canvas_text_size_native_get(ep->object); 235 size = efl_canvas_textblock_size_native_get(ep->object);
236 th = size.h; 236 th = size.h;
237 237
238 th += ins_t + ins_b; 238 th += ins_t + ins_b;
@@ -246,7 +246,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
246 * text.min: 1 X 246 * text.min: 1 X
247 * text.max: 0 X without max width. 247 * text.max: 0 X without max width.
248 * It is a singleline Textblock. */ 248 * It is a singleline Textblock. */
249 size = efl_canvas_text_size_native_get(ep->object); 249 size = efl_canvas_textblock_size_native_get(ep->object);
250 tw = size.w; 250 tw = size.w;
251 th = size.h; 251 th = size.h;
252 252
@@ -311,7 +311,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
311 if (temp_w > 0) 311 if (temp_w > 0)
312 { 312 {
313 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h)); 313 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
314 size = efl_canvas_text_size_formatted_get(ep->object); 314 size = efl_canvas_textblock_size_formatted_get(ep->object);
315 tw = size.w; 315 tw = size.w;
316 th = size.h; 316 th = size.h;
317 317
@@ -320,7 +320,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
320 } 320 }
321 else 321 else
322 { 322 {
323 size = efl_canvas_text_size_native_get(ep->object); 323 size = efl_canvas_textblock_size_native_get(ep->object);
324 th = size.h; 324 th = size.h;
325 325
326 th += ins_t + ins_b; 326 th += ins_t + ins_b;
@@ -335,7 +335,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
335 /* text.min: 1 X 335 /* text.min: 1 X
336 * text.max: 1 X 336 * text.max: 1 X
337 * Singleline. */ 337 * Singleline. */
338 size = efl_canvas_text_size_native_get(ep->object); 338 size = efl_canvas_textblock_size_native_get(ep->object);
339 tw = size.w; 339 tw = size.w;
340 th = size.h; 340 th = size.h;
341 341
@@ -374,7 +374,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
374 * text.max: 1 1 */ 374 * text.max: 1 1 */
375 375
376 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h)); 376 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
377 size = efl_canvas_text_size_formatted_get(ep->object); 377 size = efl_canvas_textblock_size_formatted_get(ep->object);
378 tw = size.w; 378 tw = size.w;
379 th = size.h; 379 th = size.h;
380 380
@@ -385,7 +385,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
385 * don't get meaningless height for multiline */ 385 * don't get meaningless height for multiline */
386 if (temp_w <= 0) 386 if (temp_w <= 0)
387 { 387 {
388 size = efl_canvas_text_size_native_get(ep->object); 388 size = efl_canvas_textblock_size_native_get(ep->object);
389 th = size.h; 389 th = size.h;
390 390
391 th += ins_t + ins_b; 391 th += ins_t + ins_b;
@@ -404,7 +404,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
404 404
405 temp_h = efl_gfx_entity_size_get(ep->object).h; 405 temp_h = efl_gfx_entity_size_get(ep->object).h;
406 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h)); 406 efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(temp_w, temp_h));
407 size = efl_canvas_text_size_formatted_get(ep->object); 407 size = efl_canvas_textblock_size_formatted_get(ep->object);
408 tw = size.w; 408 tw = size.w;
409 th = size.h; 409 th = size.h;
410 410
@@ -415,7 +415,7 @@ _edje_part_recalc_single_textblock_min_max_calc(Edje_Real_Part *ep,
415 * don't get meaningless height for multiline */ 415 * don't get meaningless height for multiline */
416 if (temp_w <= 0) 416 if (temp_w <= 0)
417 { 417 {
418 size = efl_canvas_text_size_native_get(ep->object); 418 size = efl_canvas_textblock_size_native_get(ep->object);
419 th = size.h; 419 th = size.h;
420 420
421 th += ins_t + ins_b; 421 th += ins_t + ins_b;
@@ -545,7 +545,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
545 545
546 if (ep->part->scale) base_s = TO_DOUBLE(sc); 546 if (ep->part->scale) base_s = TO_DOUBLE(sc);
547 efl_gfx_entity_scale_set(ep->object, base_s); 547 efl_gfx_entity_scale_set(ep->object, base_s);
548 size = efl_canvas_text_size_native_get(ep->object); 548 size = efl_canvas_textblock_size_native_get(ep->object);
549 549
550 orig_s = base_s; 550 orig_s = base_s;
551 /* Now make it bigger so calculations will be more accurate 551 /* Now make it bigger so calculations will be more accurate
@@ -554,7 +554,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
554 orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, 554 orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
555 orig_s * TO_INT(params->eval.w) / size.w); 555 orig_s * TO_INT(params->eval.w) / size.w);
556 efl_gfx_entity_scale_set(ep->object, orig_s); 556 efl_gfx_entity_scale_set(ep->object, orig_s);
557 size = efl_canvas_text_size_native_get(ep->object); 557 size = efl_canvas_textblock_size_native_get(ep->object);
558 } 558 }
559 if (chosen_desc->text.fit_x) 559 if (chosen_desc->text.fit_x)
560 { 560 {
@@ -563,7 +563,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
563 s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, 563 s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
564 orig_s * TO_INT(params->eval.w) / size.w); 564 orig_s * TO_INT(params->eval.w) / size.w);
565 efl_gfx_entity_scale_set(ep->object, s); 565 efl_gfx_entity_scale_set(ep->object, s);
566 efl_canvas_text_size_native_get(ep->object); 566 efl_canvas_textblock_size_native_get(ep->object);
567 } 567 }
568 } 568 }
569 if (chosen_desc->text.fit_y) 569 if (chosen_desc->text.fit_y)
@@ -580,7 +580,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
580 } 580 }
581 581
582 efl_gfx_entity_scale_set(ep->object, s); 582 efl_gfx_entity_scale_set(ep->object, s);
583 efl_canvas_text_size_native_get(ep->object); 583 efl_canvas_textblock_size_native_get(ep->object);
584 } 584 }
585 } 585 }
586 586
@@ -589,7 +589,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
589 { 589 {
590 int i = 5; /* Tries before we give up. */ 590 int i = 5; /* Tries before we give up. */
591 Eina_Size2D size; 591 Eina_Size2D size;
592 size = efl_canvas_text_size_native_get(ep->object); 592 size = efl_canvas_textblock_size_native_get(ep->object);
593 593
594 /* If we are still too big, try reducing the size to 594 /* If we are still too big, try reducing the size to
595 * 95% each try. */ 595 * 95% each try. */
@@ -605,7 +605,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
605 s = tmp_s; 605 s = tmp_s;
606 606
607 efl_gfx_entity_scale_set(ep->object, s); 607 efl_gfx_entity_scale_set(ep->object, s);
608 size = efl_canvas_text_size_native_get(ep->object); 608 size = efl_canvas_textblock_size_native_get(ep->object);
609 i--; 609 i--;
610 } 610 }
611 } 611 }
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index cf58752..a3fa4f4 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -73,10 +73,6 @@
73#include <Efreet_Trash.h> 73#include <Efreet_Trash.h>
74#include <Ethumb_Client.h> 74#include <Ethumb_Client.h>
75 75
76#ifdef ELM_ELOCATION
77#include <Elocation.h>
78#endif
79
80#ifdef ELM_EMAP 76#ifdef ELM_EMAP
81#include <EMap.h> 77#include <EMap.h>
82#endif 78#endif
diff --git a/src/lib/elementary/Elementary_Options.h.in b/src/lib/elementary/Elementary_Options.h.in
index a52444d..2110b58 100644
--- a/src/lib/elementary/Elementary_Options.h.in
+++ b/src/lib/elementary/Elementary_Options.h.in
@@ -13,8 +13,4 @@
13@ELM_LIBINTL_H_DEF@ ELM_LIBINTL_H 13@ELM_LIBINTL_H_DEF@ ELM_LIBINTL_H
14@ELM_DIRENT_H_DEF@ ELM_DIRENT_H 14@ELM_DIRENT_H_DEF@ ELM_DIRENT_H
15 15
16#ifdef EFL_BETA_API_SUPPORT
17# define ELM_ELOCATION
18#endif
19
20#endif 16#endif
diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c
index c5bda6b..017f2a8 100644
--- a/src/lib/elementary/efl_ui_internal_text_interactive.c
+++ b/src/lib/elementary/efl_ui_internal_text_interactive.c
@@ -4,7 +4,7 @@
4 4
5#include "elm_priv.h" 5#include "elm_priv.h"
6#include "efl_ui_internal_text_interactive.h" 6#include "efl_ui_internal_text_interactive.h"
7#include "efl_canvas_text_internal.h" 7#include "efl_canvas_textblock_internal.h"
8 8
9#define MY_CLASS EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS 9#define MY_CLASS EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS
10 10
@@ -52,25 +52,25 @@ static const char *_entry_selection_get(Efl_Ui_Internal_Text_Interactive *obj, E
52static void _entry_imf_cursor_info_set(Efl_Ui_Internal_Text_Interactive_Data *en); 52static void _entry_imf_cursor_info_set(Efl_Ui_Internal_Text_Interactive_Data *en);
53 53
54static void 54static void
55_text_filter_format_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 55_text_filter_format_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
56 Efl_Text_Cursor *c, const char *text); 56 Efl_Text_Cursor *c, const char *text);
57 57
58static Efl_Text_Change_Info * 58static Efl_Text_Change_Info *
59_text_filter_text_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 59_text_filter_text_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
60 Efl_Text_Cursor *c, 60 Efl_Text_Cursor *c,
61 const char *text, 61 const char *text,
62 const char *fmtpre, const char *fmtpost, 62 const char *fmtpre, const char *fmtpost,
63 Eina_Bool clearsel, Eina_Bool changeinfo); 63 Eina_Bool clearsel, Eina_Bool changeinfo);
64 64
65static Efl_Text_Change_Info * 65static Efl_Text_Change_Info *
66_text_filter_markup_prepend_internal(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 66_text_filter_markup_prepend_internal(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
67 Efl_Text_Cursor *c, 67 Efl_Text_Cursor *c,
68 char *text, 68 char *text,
69 const char *fmtpre, const char *fmtpost, 69 const char *fmtpre, const char *fmtpost,
70 Eina_Bool clearsel, Eina_Bool changeinfo); 70 Eina_Bool clearsel, Eina_Bool changeinfo);
71 71
72static Efl_Text_Change_Info * 72static Efl_Text_Change_Info *
73_text_filter_markup_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 73_text_filter_markup_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
74 Efl_Text_Cursor *c, 74 Efl_Text_Cursor *c,
75 const char *text, 75 const char *text,
76 const char *fmtpre, const char *fmtpost, 76 const char *fmtpre, const char *fmtpost,
@@ -109,7 +109,7 @@ _preedit_del(Eo *obj EINA_UNUSED, Efl_Ui_Internal_Text_Interactive_Data *en)
109static Eina_Bool 109static Eina_Bool
110_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, char **text, int *cursor_pos) 110_entry_imf_retrieve_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, char **text, int *cursor_pos)
111{ 111{
112 Efl_Canvas_Text *obj = data; 112 Efl_Canvas_Textblock *obj = data;
113 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj); 113 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj);
114 const char *str; 114 const char *str;
115 115
@@ -144,7 +144,7 @@ _return_key_update(Evas_Object *obj)
144 144
145 if (sd->input_panel_return_key_state != EFL_INPUT_TEXT_PANEL_RETURN_KEY_STATE_AUTO) return; 145 if (sd->input_panel_return_key_state != EFL_INPUT_TEXT_PANEL_RETURN_KEY_STATE_AUTO) return;
146 146
147 if (efl_canvas_text_is_empty_get(obj) == EINA_TRUE) 147 if (efl_canvas_textblock_is_empty_get(obj) == EINA_TRUE)
148 return_key_disabled = EINA_TRUE; 148 return_key_disabled = EINA_TRUE;
149 149
150 if (sd->imf_context) 150 if (sd->imf_context)
@@ -180,7 +180,7 @@ _entry_hide_visible_password(Eo *obj)
180static void 180static void
181_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info) 181_entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info)
182{ 182{
183 Efl_Canvas_Text *obj = data; 183 Efl_Canvas_Textblock *obj = data;
184 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS); 184 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS);
185 char *commit_str = event_info; 185 char *commit_str = event_info;
186 Efl_Text_Change_Info *info = NULL; 186 Efl_Text_Change_Info *info = NULL;
@@ -231,7 +231,7 @@ _entry_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void
231} 231}
232 232
233static Efl_Text_Change_Info * 233static Efl_Text_Change_Info *
234_text_filter_markup_prepend_internal(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 234_text_filter_markup_prepend_internal(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
235 Efl_Text_Cursor *c, 235 Efl_Text_Cursor *c,
236 char *text, 236 char *text,
237 const char *fmtpre, const char *fmtpost, 237 const char *fmtpre, const char *fmtpost,
@@ -284,7 +284,7 @@ _text_filter_markup_prepend_internal(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_
284} 284}
285 285
286static Efl_Text_Change_Info * 286static Efl_Text_Change_Info *
287_text_filter_markup_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 287_text_filter_markup_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
288 Efl_Text_Cursor *c, 288 Efl_Text_Cursor *c,
289 const char *text, 289 const char *text,
290 const char *fmtpre, const char *fmtpost, 290 const char *fmtpre, const char *fmtpost,
@@ -313,7 +313,7 @@ _text_filter_markup_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interacti
313} 313}
314 314
315static Efl_Text_Change_Info * 315static Efl_Text_Change_Info *
316_text_filter_text_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 316_text_filter_text_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
317 Efl_Text_Cursor *c, 317 Efl_Text_Cursor *c,
318 const char *text, 318 const char *text,
319 const char *fmtpre, const char *fmtpost, 319 const char *fmtpre, const char *fmtpost,
@@ -342,7 +342,7 @@ _text_filter_text_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive
342} 342}
343 343
344static void 344static void
345_text_filter_format_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interactive_Data *en, 345_text_filter_format_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Interactive_Data *en,
346 Efl_Text_Cursor *c, const char *text) 346 Efl_Text_Cursor *c, const char *text)
347{ 347{
348 EINA_SAFETY_ON_NULL_RETURN(text); 348 EINA_SAFETY_ON_NULL_RETURN(text);
@@ -416,7 +416,7 @@ _text_filter_format_prepend(Efl_Canvas_Text *obj, Efl_Ui_Internal_Text_Interacti
416static void 416static void
417_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info EINA_UNUSED) 417_entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info EINA_UNUSED)
418{ 418{
419 Efl_Canvas_Text *obj = data; 419 Efl_Canvas_Textblock *obj = data;
420 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj); 420 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj);
421 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS); 421 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS);
422 Efl_Text_Change_Info *info = NULL; 422 Efl_Text_Change_Info *info = NULL;
@@ -518,12 +518,12 @@ _entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUS
518 { 518 {
519 /* set preedit start cursor */ 519 /* set preedit start cursor */
520 if (!en->preedit_start) 520 if (!en->preedit_start)
521 en->preedit_start = efl_canvas_text_cursor_create(obj); 521 en->preedit_start = efl_canvas_textblock_cursor_create(obj);
522 efl_text_cursor_copy(cur, en->preedit_start); 522 efl_text_cursor_copy(cur, en->preedit_start);
523 523
524 /* set preedit end cursor */ 524 /* set preedit end cursor */
525 if (!en->preedit_end) 525 if (!en->preedit_end)
526 en->preedit_end = efl_canvas_text_cursor_create(obj); 526 en->preedit_end = efl_canvas_textblock_cursor_create(obj);
527 efl_text_cursor_copy(cur, en->preedit_end); 527 efl_text_cursor_copy(cur, en->preedit_end);
528 528
529 preedit_end_pos = efl_text_cursor_position_get(cur); 529 preedit_end_pos = efl_text_cursor_position_get(cur);
@@ -561,7 +561,7 @@ _entry_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUS
561static void 561static void
562_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info) 562_entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info)
563{ 563{
564 Efl_Canvas_Text *obj = data; 564 Efl_Canvas_Textblock *obj = data;
565 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj); 565 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj);
566 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS); 566 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS);
567 Ecore_IMF_Event_Delete_Surrounding *ev = event_info; 567 Ecore_IMF_Event_Delete_Surrounding *ev = event_info;
@@ -573,10 +573,10 @@ _entry_imf_event_delete_surrounding_cb(void *data, Ecore_IMF_Context *ctx EINA_U
573 573
574 cursor_pos = efl_text_cursor_position_get(cur); 574 cursor_pos = efl_text_cursor_position_get(cur);
575 575
576 del_start = efl_canvas_text_cursor_create(obj); 576 del_start = efl_canvas_textblock_cursor_create(obj);
577 efl_text_cursor_position_set(del_start, cursor_pos + ev->offset); 577 efl_text_cursor_position_set(del_start, cursor_pos + ev->offset);
578 578
579 del_end = efl_canvas_text_cursor_create(obj); 579 del_end = efl_canvas_textblock_cursor_create(obj);
580 efl_text_cursor_position_set(del_end, cursor_pos + ev->offset + ev->n_chars); 580 efl_text_cursor_position_set(del_end, cursor_pos + ev->offset + ev->n_chars);
581 581
582 start = efl_text_cursor_position_get(del_start); 582 start = efl_text_cursor_position_get(del_start);
@@ -605,7 +605,7 @@ end:
605static void 605static void
606_entry_imf_event_selection_set_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info) 606_entry_imf_event_selection_set_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, void *event_info)
607{ 607{
608 Efl_Canvas_Text *obj = data; 608 Efl_Canvas_Textblock *obj = data;
609 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj); 609 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj);
610 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS); 610 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS);
611 Ecore_IMF_Event_Selection *ev = event_info; 611 Ecore_IMF_Event_Selection *ev = event_info;
@@ -628,7 +628,7 @@ _entry_imf_event_selection_set_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED
628static Eina_Bool 628static Eina_Bool
629_entry_imf_retrieve_selection_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, char **text) 629_entry_imf_retrieve_selection_cb(void *data, Ecore_IMF_Context *ctx EINA_UNUSED, char **text)
630{ 630{
631 Efl_Canvas_Text *obj = data; 631 Efl_Canvas_Textblock *obj = data;
632 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS); 632 Efl_Ui_Internal_Text_Interactive_Data *en = efl_data_scope_get(obj, MY_CLASS);
633 const char *selection_text = NULL; 633 const char *selection_text = NULL;
634 634
@@ -856,10 +856,10 @@ _efl_ui_internal_text_interactive_efl_text_interactive_all_select(
856 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj); 856 Efl_Text_Cursor *cur = efl_text_interactive_main_cursor_get(obj);
857 _entry_imf_context_reset(en); 857 _entry_imf_context_reset(en);
858 858
859 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_FIRST); 859 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
860 _entry_imf_context_reset(en); 860 _entry_imf_context_reset(en);
861 _sel_init(cur, obj, en); 861 _sel_init(cur, obj, en);
862 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 862 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
863 _sel_extend(cur, obj, en); 863 _sel_extend(cur, obj, en);
864} 864}
865 865
@@ -1106,7 +1106,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1106 { 1106 {
1107 if (multiline) 1107 if (multiline)
1108 { 1108 {
1109 if (shift || efl_canvas_text_newline_as_paragraph_separator_get(obj)) 1109 if (shift || efl_canvas_textblock_newline_as_paragraph_separator_get(obj))
1110 { 1110 {
1111 string = "\n"; 1111 string = "\n";
1112 } 1112 }
@@ -1193,7 +1193,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1193 if (control && !en->have_selection) 1193 if (control && !en->have_selection)
1194 { 1194 {
1195 // del to start of previous word 1195 // del to start of previous word
1196 Efl_Text_Cursor *tc = efl_canvas_text_cursor_create(obj); 1196 Efl_Text_Cursor *tc = efl_canvas_textblock_cursor_create(obj);
1197 1197
1198 efl_text_cursor_copy(tc, cur); 1198 efl_text_cursor_copy(tc, cur);
1199 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV); 1199 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_CHAR_PREV);
@@ -1228,7 +1228,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1228 if (control) 1228 if (control)
1229 { 1229 {
1230 // del to end of next word 1230 // del to end of next word
1231 Efl_Text_Cursor *tc = efl_canvas_text_cursor_create(obj); 1231 Efl_Text_Cursor *tc = efl_canvas_textblock_cursor_create(obj);
1232 1232
1233 efl_text_cursor_copy(tc, cur); 1233 efl_text_cursor_copy(tc, cur);
1234 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_END); 1234 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_END);
@@ -1265,7 +1265,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1265 _key_down_sel_pre(obj, cur, en, shift, EINA_FALSE); 1265 _key_down_sel_pre(obj, cur, en, shift, EINA_FALSE);
1266 1266
1267 if ((control) && (multiline)) 1267 if ((control) && (multiline))
1268 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_FIRST); 1268 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
1269 else 1269 else
1270 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START); 1270 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START);
1271 1271
@@ -1280,7 +1280,7 @@ _key_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void
1280 _key_down_sel_pre(obj, cur, en, shift, EINA_TRUE); 1280 _key_down_sel_pre(obj, cur, en, shift, EINA_TRUE);
1281 1281
1282 if ((control) && (multiline)) 1282 if ((control) && (multiline))
1283 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 1283 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
1284 else 1284 else
1285 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_END); 1285 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_END);
1286 1286
@@ -1466,28 +1466,28 @@ end:
1466} 1466}
1467 1467
1468static void 1468static void
1469_cursor_char_coord_set(Efl_Canvas_Text *obj, Efl_Text_Cursor *cur, Evas_Coord canvasx, Evas_Coord canvasy, Evas_Coord *_cx, Evas_Coord *_cy) 1469_cursor_char_coord_set(Efl_Canvas_Textblock *obj, Efl_Text_Cursor *cur, Evas_Coord canvasx, Evas_Coord canvasy, Evas_Coord *_cx, Evas_Coord *_cy)
1470{ 1470{
1471 Evas_Coord cx, cy; 1471 Evas_Coord cx, cy;
1472 Evas_Coord x, y, lh = 0, cly = 0; 1472 Evas_Coord x, y, lh = 0, cly = 0;
1473 Efl_Text_Cursor *line_cur; 1473 Efl_Text_Cursor *line_cur;
1474 Efl_Text_Cursor *tc; 1474 Efl_Text_Cursor *tc;
1475 1475
1476 tc = efl_canvas_text_cursor_create(obj); 1476 tc = efl_canvas_textblock_cursor_create(obj);
1477 efl_text_cursor_copy(cur, tc); 1477 efl_text_cursor_copy(cur, tc);
1478 evas_object_geometry_get(obj, &x, &y, NULL, NULL); 1478 evas_object_geometry_get(obj, &x, &y, NULL, NULL);
1479 cx = canvasx - x; 1479 cx = canvasx - x;
1480 cy = canvasy - y; 1480 cy = canvasy - y;
1481 1481
1482 line_cur = efl_canvas_text_cursor_create(obj); 1482 line_cur = efl_canvas_textblock_cursor_create(obj);
1483 efl_text_cursor_move(line_cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 1483 efl_text_cursor_move(line_cur, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
1484 evas_textblock_cursor_line_geometry_get(efl_text_cursor_handle_get(line_cur), NULL, &cly, NULL, &lh); 1484 evas_textblock_cursor_line_geometry_get(efl_text_cursor_handle_get(line_cur), NULL, &cly, NULL, &lh);
1485 /* Consider a threshold of half the line height */ 1485 /* Consider a threshold of half the line height */
1486 if (cy > (cly + lh) && cy < (cly + lh + lh / 2)) 1486 if (cy > (cly + lh) && cy < (cly + lh + lh / 2))
1487 { 1487 {
1488 cy = cly + lh - 1; // Make it inside Textblock 1488 cy = cly + lh - 1; // Make it inside Textblock
1489 } 1489 }
1490 efl_text_cursor_move(line_cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_FIRST); 1490 efl_text_cursor_move(line_cur, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
1491 evas_textblock_cursor_line_geometry_get(efl_text_cursor_handle_get(line_cur), NULL, &cly, NULL, NULL); 1491 evas_textblock_cursor_line_geometry_get(efl_text_cursor_handle_get(line_cur), NULL, &cly, NULL, NULL);
1492 1492
1493 if (cy < cly && cy > (cly - lh / 2)) 1493 if (cy < cly && cy > (cly - lh / 2))
@@ -1538,7 +1538,7 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
1538 { 1538 {
1539 if (shift) 1539 if (shift)
1540 { 1540 {
1541 tc = efl_canvas_text_cursor_create(obj); 1541 tc = efl_canvas_textblock_cursor_create(obj);
1542 efl_text_cursor_copy(cur, tc); 1542 efl_text_cursor_copy(cur, tc);
1543 if (efl_text_cursor_compare(cur, en->sel_start) < 0) 1543 if (efl_text_cursor_compare(cur, en->sel_start) < 0)
1544 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START); 1544 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START);
@@ -1551,7 +1551,7 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
1551 en->have_selection = EINA_FALSE; 1551 en->have_selection = EINA_FALSE;
1552 en->selecting = EINA_FALSE; 1552 en->selecting = EINA_FALSE;
1553 _sel_clear(obj, en); 1553 _sel_clear(obj, en);
1554 tc = efl_canvas_text_cursor_create(obj); 1554 tc = efl_canvas_textblock_cursor_create(obj);
1555 efl_text_cursor_copy(cur, tc); 1555 efl_text_cursor_copy(cur, tc);
1556 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START); 1556 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_LINE_START);
1557 _sel_init(cur, obj, en); 1557 _sel_init(cur, obj, en);
@@ -1564,7 +1564,7 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
1564 { 1564 {
1565 if (shift) 1565 if (shift)
1566 { 1566 {
1567 tc = efl_canvas_text_cursor_create(obj); 1567 tc = efl_canvas_textblock_cursor_create(obj);
1568 efl_text_cursor_copy(cur, tc); 1568 efl_text_cursor_copy(cur, tc);
1569 if (efl_text_cursor_compare(cur, en->sel_start) < 0) 1569 if (efl_text_cursor_compare(cur, en->sel_start) < 0)
1570 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START); 1570 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START);
@@ -1580,7 +1580,7 @@ _mouse_down_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EIN
1580 en->have_selection = EINA_FALSE; 1580 en->have_selection = EINA_FALSE;
1581 en->selecting = EINA_FALSE; 1581 en->selecting = EINA_FALSE;
1582 _sel_clear(obj, en); 1582 _sel_clear(obj, en);
1583 tc = efl_canvas_text_cursor_create(obj); 1583 tc = efl_canvas_textblock_cursor_create(obj);
1584 efl_text_cursor_copy(cur, tc); 1584 efl_text_cursor_copy(cur, tc);
1585 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START); 1585 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_WORD_START);
1586 _sel_init(cur, obj, en); 1586 _sel_init(cur, obj, en);
@@ -1679,7 +1679,7 @@ _mouse_move_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, vo
1679 1679
1680 if (en->selecting) 1680 if (en->selecting)
1681 { 1681 {
1682 tc = efl_canvas_text_cursor_create(obj); 1682 tc = efl_canvas_textblock_cursor_create(obj);
1683 efl_text_cursor_copy(cur, tc); 1683 efl_text_cursor_copy(cur, tc);
1684 evas_object_geometry_get(obj, &x, &y, &w, &h); 1684 evas_object_geometry_get(obj, &x, &y, &w, &h);
1685 cx = ev->cur.canvas.x - x; 1685 cx = ev->cur.canvas.x - x;
@@ -1692,7 +1692,7 @@ _mouse_move_cb(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, vo
1692 else 1692 else
1693 { 1693 {
1694 Evas_Coord lx, ly, lw, lh; 1694 Evas_Coord lx, ly, lw, lh;
1695 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_FIRST); 1695 efl_text_cursor_move(cur, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
1696 evas_textblock_cursor_line_geometry_get(efl_text_cursor_handle_get(cur), &lx, &ly, &lw, &lh); 1696 evas_textblock_cursor_line_geometry_get(efl_text_cursor_handle_get(cur), &lx, &ly, &lw, &lh);
1697 efl_text_cursor_char_coord_set(cur, EINA_POSITION2D(cx, ly + (lh / 2))); 1697 efl_text_cursor_char_coord_set(cur, EINA_POSITION2D(cx, ly + (lh / 2)));
1698 } 1698 }
@@ -1733,9 +1733,9 @@ _efl_ui_internal_text_interactive_efl_object_finalize(Eo *obj, Efl_Ui_Internal_T
1733 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL); 1733 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL);
1734 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, NULL); 1734 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, NULL);
1735 1735
1736 en->main_cursor = efl_canvas_text_cursor_create(obj); 1736 en->main_cursor = efl_canvas_textblock_cursor_create(obj);
1737 en->sel_start = efl_canvas_text_cursor_create(obj); 1737 en->sel_start = efl_canvas_textblock_cursor_create(obj);
1738 en->sel_end = efl_canvas_text_cursor_create(obj); 1738 en->sel_end = efl_canvas_textblock_cursor_create(obj);
1739 1739
1740 efl_event_callback_add(efl_text_interactive_main_cursor_get(obj), EFL_TEXT_CURSOR_EVENT_CHANGED, 1740 efl_event_callback_add(efl_text_interactive_main_cursor_get(obj), EFL_TEXT_CURSOR_EVENT_CHANGED,
1741 _sel_cursor_changed, obj); 1741 _sel_cursor_changed, obj);
@@ -1810,7 +1810,7 @@ _efl_ui_internal_text_interactive_efl_text_text_set(Eo *eo_obj, Efl_Ui_Internal_
1810 const char *text) 1810 const char *text)
1811{ 1811{
1812 efl_text_set(efl_super(eo_obj, MY_CLASS), text); 1812 efl_text_set(efl_super(eo_obj, MY_CLASS), text);
1813 efl_text_cursor_move(o->main_cursor, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 1813 efl_text_cursor_move(o->main_cursor, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
1814} 1814}
1815 1815
1816EOLIAN void 1816EOLIAN void
@@ -1818,7 +1818,7 @@ _efl_ui_internal_text_interactive_efl_text_markup_markup_set(Eo *eo_obj, Efl_Ui_
1818 const char *text) 1818 const char *text)
1819{ 1819{
1820 efl_text_markup_set(efl_super(eo_obj, MY_CLASS), text); 1820 efl_text_markup_set(efl_super(eo_obj, MY_CLASS), text);
1821 efl_text_cursor_move(o->main_cursor, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 1821 efl_text_cursor_move(o->main_cursor, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
1822} 1822}
1823 1823
1824EOLIAN static void 1824EOLIAN static void
diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.eo b/src/lib/elementary/efl_ui_internal_text_interactive.eo
index 8c8a4cd..44e871c 100644
--- a/src/lib/elementary/efl_ui_internal_text_interactive.eo
+++ b/src/lib/elementary/efl_ui_internal_text_interactive.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Internal.Text.Interactive extends Efl.Canvas.Text implements Efl.Text_Interactive, Efl.Input_Text 1class @beta Efl.Ui.Internal.Text.Interactive extends Efl.Canvas.Textblock implements Efl.Text_Interactive, Efl.Input_Text
2{ 2{
3 [[An internal object in charge of the interactive aspect of the text widget. 3 [[An internal object in charge of the interactive aspect of the text widget.
4 4
diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.c b/src/lib/elementary/efl_ui_internal_text_scroller.c
index f5e366d..3387759 100644
--- a/src/lib/elementary/efl_ui_internal_text_scroller.c
+++ b/src/lib/elementary/efl_ui_internal_text_scroller.c
@@ -36,7 +36,7 @@
36 36
37typedef struct _Efl_Ui_Internal_Text_Scroller_Data 37typedef struct _Efl_Ui_Internal_Text_Scroller_Data
38{ 38{
39 Efl_Canvas_Text *text_obj; 39 Efl_Canvas_Textblock *text_obj;
40 Efl_Ui_Table *text_table; 40 Efl_Ui_Table *text_table;
41 Eo *smanager; 41 Eo *smanager;
42 42
@@ -101,7 +101,7 @@ _efl_ui_internal_text_scroller_efl_canvas_group_group_calculate(Eo *obj,
101 efl_event_freeze(sd->text_obj); 101 efl_event_freeze(sd->text_obj);
102 efl_gfx_entity_size_set(sd->text_table, view.size); 102 efl_gfx_entity_size_set(sd->text_table, view.size);
103 efl_gfx_entity_size_set(sd->text_obj, view.size); 103 efl_gfx_entity_size_set(sd->text_obj, view.size);
104 fsz = efl_canvas_text_size_formatted_get(sd->text_obj); 104 fsz = efl_canvas_textblock_size_formatted_get(sd->text_obj);
105 efl_gfx_entity_size_set(sd->text_table, sz); 105 efl_gfx_entity_size_set(sd->text_table, sz);
106 efl_gfx_entity_size_set(sd->text_obj, sz); 106 efl_gfx_entity_size_set(sd->text_obj, sz);
107 efl_event_thaw(sd->text_obj); 107 efl_event_thaw(sd->text_obj);
@@ -152,7 +152,7 @@ _efl_ui_internal_text_scroller_efl_object_destructor(Eo *obj,
152EOLIAN static void 152EOLIAN static void
153_efl_ui_internal_text_scroller_initialize(Eo *obj, 153_efl_ui_internal_text_scroller_initialize(Eo *obj,
154 Efl_Ui_Internal_Text_Scroller_Data *sd, 154 Efl_Ui_Internal_Text_Scroller_Data *sd,
155 Efl_Canvas_Text *text_obj, 155 Efl_Canvas_Textblock *text_obj,
156 Efl_Ui_Table *text_table) 156 Efl_Ui_Table *text_table)
157{ 157{
158 if (efl_finalized_get(obj)) 158 if (efl_finalized_get(obj))
diff --git a/src/lib/elementary/efl_ui_internal_text_scroller.eo b/src/lib/elementary/efl_ui_internal_text_scroller.eo
index 3108000..b616674 100644
--- a/src/lib/elementary/efl_ui_internal_text_scroller.eo
+++ b/src/lib/elementary/efl_ui_internal_text_scroller.eo
@@ -10,7 +10,7 @@ class @beta Efl.Ui.Internal_Text_Scroller extends Efl.Ui.Scroller
10 [[Internal-usage text scroller class. 10 [[Internal-usage text scroller class.
11 11
12 This class is a special scroller that evaluates its size based on the 12 This class is a special scroller that evaluates its size based on the
13 @Efl.Canvas.Text object it holds. On initialization the object is meant 13 @Efl.Canvas.Textblock object it holds. On initialization the object is meant
14 to be passed along a container (so that other objects such as 14 to be passed along a container (so that other objects such as
15 a "guide hint" text object are store in such container. 15 a "guide hint" text object are store in such container.
16 ]] 16 ]]
@@ -32,11 +32,11 @@ class @beta Efl.Ui.Internal_Text_Scroller extends Efl.Ui.Scroller
32 } 32 }
33 } 33 }
34 initialize { 34 initialize {
35 [[The Efl.Canvas.Text content of this scroller. 35 [[The Efl.Canvas.Textblock content of this scroller.
36 This should be called upon constructing the object. 36 This should be called upon constructing the object.
37 ]] 37 ]]
38 params { 38 params {
39 text_obj: Efl.Canvas.Text; [[The text object to query]] 39 text_obj: Efl.Canvas.Textblock; [[The text object to query]]
40 text_table: Efl.Ui.Table; [[The table container of 40 text_table: Efl.Ui.Table; [[The table container of
41 the $text_obj]] 41 the $text_obj]]
42 } 42 }
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index e05c2ed..c65d590 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -18,7 +18,7 @@
18#include "elm_hoversel_eo.h" 18#include "elm_hoversel_eo.h"
19#include "efl_ui_text_part.eo.h" 19#include "efl_ui_text_part.eo.h"
20#include "elm_part_helper.h" 20#include "elm_part_helper.h"
21#include "efl_canvas_text_internal.h" 21#include "efl_canvas_textblock_internal.h"
22 22
23typedef struct _Efl_Ui_Text_Data Efl_Ui_Text_Data; 23typedef struct _Efl_Ui_Text_Data Efl_Ui_Text_Data;
24typedef struct _Efl_Ui_Text_Rectangle Efl_Ui_Text_Rectangle; 24typedef struct _Efl_Ui_Text_Rectangle Efl_Ui_Text_Rectangle;
@@ -65,8 +65,8 @@ struct _Efl_Ui_Text_Data
65 int gen; 65 int gen;
66 Eina_List *sel; 66 Eina_List *sel;
67 Eina_List *items; /** context menu item list */ 67 Eina_List *items; /** context menu item list */
68 Efl_Canvas_Text_Factory *item_factory; 68 Efl_Canvas_Textblock_Factory *item_factory;
69 Efl_Canvas_Text_Factory *item_fallback_factory; 69 Efl_Canvas_Textblock_Factory *item_fallback_factory;
70 Eina_List *markup_filters; 70 Eina_List *markup_filters;
71 Ecore_Job *hov_deljob; 71 Ecore_Job *hov_deljob;
72 Mod_Api *api; // module api if supplied 72 Mod_Api *api; // module api if supplied
@@ -851,9 +851,9 @@ _efl_ui_text_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Text_Data *sd)
851 efl_gfx_entity_size_set(sd->text_obj, EINA_SIZE2D(sz.w, 0)); 851 efl_gfx_entity_size_set(sd->text_obj, EINA_SIZE2D(sz.w, 0));
852 /* ignore current object size for single-line since we always need to know the actual size */ 852 /* ignore current object size for single-line since we always need to know the actual size */
853 if (!efl_text_multiline_get(obj)) 853 if (!efl_text_multiline_get(obj))
854 min = efl_canvas_text_size_native_get(sd->text_obj); 854 min = efl_canvas_textblock_size_native_get(sd->text_obj);
855 else 855 else
856 min = efl_canvas_text_size_formatted_get(sd->text_obj); 856 min = efl_canvas_textblock_size_formatted_get(sd->text_obj);
857 efl_gfx_entity_size_set(sd->text_obj, text_sz); 857 efl_gfx_entity_size_set(sd->text_obj, text_sz);
858 efl_event_thaw(sd->text_obj); 858 efl_event_thaw(sd->text_obj);
859 min.w += edmin.w; 859 min.w += edmin.w;
@@ -1485,11 +1485,11 @@ _item_get(void *data, const char *item)
1485 { 1485 {
1486 if (sd->item_factory) 1486 if (sd->item_factory)
1487 { 1487 {
1488 o = efl_canvas_text_factory_create(sd->item_factory, data, item); 1488 o = efl_canvas_textblock_factory_create(sd->item_factory, data, item);
1489 } 1489 }
1490 else if (sd->item_fallback_factory) 1490 else if (sd->item_fallback_factory)
1491 { 1491 {
1492 o = efl_canvas_text_factory_create(sd->item_fallback_factory, 1492 o = efl_canvas_textblock_factory_create(sd->item_fallback_factory,
1493 data, item); 1493 data, item);
1494 } 1494 }
1495 } 1495 }
@@ -1967,7 +1967,7 @@ _efl_ui_text_efl_object_constructor(Eo *obj, Efl_Ui_Text_Data *sd)
1967 efl_event_callback_forwarder_add(text_obj, EFL_TEXT_INTERACTIVE_EVENT_UNDO_REQUEST, obj); 1967 efl_event_callback_forwarder_add(text_obj, EFL_TEXT_INTERACTIVE_EVENT_UNDO_REQUEST, obj);
1968 efl_event_callback_forwarder_add(text_obj, EFL_TEXT_INTERACTIVE_EVENT_PREEDIT_CHANGED, obj); 1968 efl_event_callback_forwarder_add(text_obj, EFL_TEXT_INTERACTIVE_EVENT_PREEDIT_CHANGED, obj);
1969 sd->text_obj = text_obj; 1969 sd->text_obj = text_obj;
1970 sd->text_guide_obj = efl_add(EFL_CANVAS_TEXT_CLASS, obj); 1970 sd->text_guide_obj = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, obj);
1971 sd->text_table = efl_add(EFL_UI_TABLE_CLASS, obj); 1971 sd->text_table = efl_add(EFL_UI_TABLE_CLASS, obj);
1972 efl_composite_attach(obj, text_obj); 1972 efl_composite_attach(obj, text_obj);
1973 1973
@@ -2028,7 +2028,7 @@ _efl_ui_text_efl_object_finalize(Eo *obj,
2028 (sd->entry_edje, EVAS_HINT_FILL, EVAS_HINT_FILL); 2028 (sd->entry_edje, EVAS_HINT_FILL, EVAS_HINT_FILL);
2029 efl_event_callback_add(sd->text_obj, EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER, 2029 efl_event_callback_add(sd->text_obj, EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER,
2030 _efl_ui_text_changed_user_cb, obj); 2030 _efl_ui_text_changed_user_cb, obj);
2031 efl_event_callback_add(sd->text_obj, EFL_CANVAS_TEXT_EVENT_CHANGED, 2031 efl_event_callback_add(sd->text_obj, EFL_CANVAS_TEXTBLOCK_EVENT_CHANGED,
2032 _efl_ui_text_changed_cb, obj); 2032 _efl_ui_text_changed_cb, obj);
2033 efl_event_callback_add(sd->text_obj, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, 2033 efl_event_callback_add(sd->text_obj, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED,
2034 _efl_ui_text_selection_start_clear_cb, obj); 2034 _efl_ui_text_selection_start_clear_cb, obj);
@@ -2921,8 +2921,8 @@ _efl_ui_text_efl_access_text_default_attributes_get(const Eo *obj, Efl_Ui_Text_D
2921 start = efl_ui_text_cursor_create(mobj); 2921 start = efl_ui_text_cursor_create(mobj);
2922 end = efl_ui_text_cursor_create(mobj); 2922 end = efl_ui_text_cursor_create(mobj);
2923 2923
2924 efl_text_cursor_move(start, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_FIRST); 2924 efl_text_cursor_move(start, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
2925 efl_text_cursor_move(end, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 2925 efl_text_cursor_move(end, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
2926 2926
2927 annotations = efl_text_attribute_factory_range_attributes_get(start, end); 2927 annotations = efl_text_attribute_factory_range_attributes_get(start, end);
2928 2928
@@ -3337,12 +3337,12 @@ _anchors_update(Eo *obj, Efl_Ui_Text_Data *sd)
3337 3337
3338 sd->gen++; 3338 sd->gen++;
3339 3339
3340 start = efl_canvas_text_cursor_create(sd->text_obj); 3340 start = efl_canvas_textblock_cursor_create(sd->text_obj);
3341 end = efl_canvas_text_cursor_create(sd->text_obj); 3341 end = efl_canvas_textblock_cursor_create(sd->text_obj);
3342 3342
3343 /* Retrieve all annotations in the text. */ 3343 /* Retrieve all annotations in the text. */
3344 efl_text_cursor_move(start, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_FIRST); 3344 efl_text_cursor_move(start, EFL_TEXT_CURSOR_MOVE_TYPE_FIRST);
3345 efl_text_cursor_move(end, EFL_TEXT_CURSOR_MOVE_TYPE_PARAGRAPH_LAST); 3345 efl_text_cursor_move(end, EFL_TEXT_CURSOR_MOVE_TYPE_LAST);
3346 3346
3347 it = efl_text_attribute_factory_range_attributes_get(start, end); 3347 it = efl_text_attribute_factory_range_attributes_get(start, end);
3348 efl_del(start); 3348 efl_del(start);
@@ -3645,7 +3645,7 @@ _efl_ui_text_move_cb(void *data, Evas *e EINA_UNUSED,
3645 3645
3646static void 3646static void
3647_efl_ui_text_item_factory_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *pd, 3647_efl_ui_text_item_factory_set(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *pd,
3648 Efl_Canvas_Text_Factory *item_factory) 3648 Efl_Canvas_Textblock_Factory *item_factory)
3649{ 3649{
3650 if (pd->item_factory) efl_unref(pd->item_factory); 3650 if (pd->item_factory) efl_unref(pd->item_factory);
3651 pd->item_factory = efl_ref(item_factory); 3651 pd->item_factory = efl_ref(item_factory);
diff --git a/src/lib/elementary/efl_ui_text.eo b/src/lib/elementary/efl_ui_text.eo
index 785fe34..935c7f5 100644
--- a/src/lib/elementary/efl_ui_text.eo
+++ b/src/lib/elementary/efl_ui_text.eo
@@ -61,7 +61,7 @@ class @beta Efl.Ui.Text extends Efl.Ui.Layout_Base implements Efl.Input.Clickabl
61 "emoticon/happy" or "href=file://image.jpg" etc. 61 "emoticon/happy" or "href=file://image.jpg" etc.
62 ]] 62 ]]
63 values { 63 values {
64 item_factory: Efl.Canvas.Text_Factory; [[Factory to create items]] 64 item_factory: Efl.Canvas.Textblock_Factory; [[Factory to create items]]
65 } 65 }
66 } 66 }
67 cursor_add { 67 cursor_add {
diff --git a/src/lib/elementary/efl_ui_text_editable.eo b/src/lib/elementary/efl_ui_text_editable.eo
deleted file mode 100644
index 32a987e..0000000
--- a/src/lib/elementary/efl_ui_text_editable.eo
+++ /dev/null
@@ -1,8 +0,0 @@
1class @beta Efl.Ui.Text_Editable extends Efl.Ui.Text
2{
3 [[Efl UI text editable class]]
4 data: null;
5 implements {
6 Efl.Object.constructor;
7 }
8}
diff --git a/src/lib/elementary/efl_ui_text_factory_emoticons.c b/src/lib/elementary/efl_ui_text_factory_emoticons.c
index f66c99d..6d61fe3 100644
--- a/src/lib/elementary/efl_ui_text_factory_emoticons.c
+++ b/src/lib/elementary/efl_ui_text_factory_emoticons.c
@@ -15,7 +15,7 @@ struct _Efl_Ui_Text_Factory_Emoticons_Data
15}; 15};
16 16
17EOLIAN static Efl_Canvas_Object 17EOLIAN static Efl_Canvas_Object
18*_efl_ui_text_factory_emoticons_efl_canvas_text_factory_create( 18*_efl_ui_text_factory_emoticons_efl_canvas_textblock_factory_create(
19 Eo *obj EINA_UNUSED, 19 Eo *obj EINA_UNUSED,
20 Efl_Ui_Text_Factory_Emoticons_Data *pd EINA_UNUSED, 20 Efl_Ui_Text_Factory_Emoticons_Data *pd EINA_UNUSED,
21 Efl_Canvas_Object *object, 21 Efl_Canvas_Object *object,
diff --git a/src/lib/elementary/efl_ui_text_factory_emoticons.eo b/src/lib/elementary/efl_ui_text_factory_emoticons.eo
index 903f449..9265cc5 100644
--- a/src/lib/elementary/efl_ui_text_factory_emoticons.eo
+++ b/src/lib/elementary/efl_ui_text_factory_emoticons.eo
@@ -1,8 +1,8 @@
1class @beta Efl.Ui.Text_Factory.Emoticons extends Efl.Object implements Efl.Canvas.Text_Factory 1class @beta Efl.Ui.Text_Factory.Emoticons extends Efl.Object implements Efl.Canvas.Textblock_Factory
2{ 2{
3 [[Factory that creates emoticons from the current theme given a key. 3 [[Factory that creates emoticons from the current theme given a key.
4 ]] 4 ]]
5 implements { 5 implements {
6 Efl.Canvas.Text_Factory.create; 6 Efl.Canvas.Textblock_Factory.create;
7 } 7 }
8} 8}
diff --git a/src/lib/elementary/efl_ui_text_factory_fallback.c b/src/lib/elementary/efl_ui_text_factory_fallback.c
index 3568ba9..048b8ae 100644
--- a/src/lib/elementary/efl_ui_text_factory_fallback.c
+++ b/src/lib/elementary/efl_ui_text_factory_fallback.c
@@ -12,7 +12,7 @@ typedef struct _Efl_Ui_Text_Factory_Fallback_Data Efl_Ui_Text_Factory_Fallback_D
12 12
13struct _Efl_Ui_Text_Factory_Fallback_Data 13struct _Efl_Ui_Text_Factory_Fallback_Data
14{ 14{
15 Efl_Canvas_Text_Factory *emoticon_factory, *image_factory; 15 Efl_Canvas_Textblock_Factory *emoticon_factory, *image_factory;
16}; 16};
17 17
18EOLIAN static Eo * 18EOLIAN static Eo *
@@ -34,7 +34,7 @@ _efl_ui_text_factory_fallback_efl_object_destructor(Eo *obj,
34 34
35 35
36EOLIAN static Efl_Canvas_Object 36EOLIAN static Efl_Canvas_Object
37*_efl_ui_text_factory_fallback_efl_canvas_text_factory_create( 37*_efl_ui_text_factory_fallback_efl_canvas_textblock_factory_create(
38 Eo *obj EINA_UNUSED, 38 Eo *obj EINA_UNUSED,
39 Efl_Ui_Text_Factory_Fallback_Data *pd EINA_UNUSED, 39 Efl_Ui_Text_Factory_Fallback_Data *pd EINA_UNUSED,
40 Efl_Canvas_Object *object, 40 Efl_Canvas_Object *object,
@@ -48,11 +48,11 @@ EOLIAN static Efl_Canvas_Object
48 if (key && !strncmp(key, "file://", 7)) 48 if (key && !strncmp(key, "file://", 7))
49 { 49 {
50 const char *fname = key + 7; 50 const char *fname = key + 7;
51 o = efl_canvas_text_factory_create(pd->image_factory, object, fname); 51 o = efl_canvas_textblock_factory_create(pd->image_factory, object, fname);
52 } 52 }
53 else 53 else
54 { 54 {
55 o = efl_canvas_text_factory_create(pd->emoticon_factory, object, key); 55 o = efl_canvas_textblock_factory_create(pd->emoticon_factory, object, key);
56 } 56 }
57 return o; 57 return o;
58} 58}
diff --git a/src/lib/elementary/efl_ui_text_factory_fallback.eo b/src/lib/elementary/efl_ui_text_factory_fallback.eo
index f41352b..1af3293 100644
--- a/src/lib/elementary/efl_ui_text_factory_fallback.eo
+++ b/src/lib/elementary/efl_ui_text_factory_fallback.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Text_Factory.Fallback extends Efl.Object implements Efl.Canvas.Text_Factory 1class @beta Efl.Ui.Text_Factory.Fallback extends Efl.Object implements Efl.Canvas.Textblock_Factory
2{ 2{
3 [[Internal factory for fallback cases. 3 [[Internal factory for fallback cases.
4 4
@@ -10,6 +10,6 @@ class @beta Efl.Ui.Text_Factory.Fallback extends Efl.Object implements Efl.Canva
10 implements { 10 implements {
11 Efl.Object.constructor; 11 Efl.Object.constructor;
12 Efl.Object.destructor; 12 Efl.Object.destructor;
13 Efl.Canvas.Text_Factory.create; 13 Efl.Canvas.Textblock_Factory.create;
14 } 14 }
15} 15}
diff --git a/src/lib/elementary/efl_ui_text_factory_images.c b/src/lib/elementary/efl_ui_text_factory_images.c
index 38529e4..55b8978 100644
--- a/src/lib/elementary/efl_ui_text_factory_images.c
+++ b/src/lib/elementary/efl_ui_text_factory_images.c
@@ -49,7 +49,7 @@ _efl_ui_text_factory_images_efl_object_destructor(Eo *obj,
49} 49}
50 50
51EOLIAN static Efl_Canvas_Object * 51EOLIAN static Efl_Canvas_Object *
52_efl_ui_text_factory_images_efl_canvas_text_factory_create(Eo *obj EINA_UNUSED, 52_efl_ui_text_factory_images_efl_canvas_textblock_factory_create(Eo *obj EINA_UNUSED,
53 Efl_Ui_Text_Factory_Images_Data *pd EINA_UNUSED, 53 Efl_Ui_Text_Factory_Images_Data *pd EINA_UNUSED,
54 Efl_Canvas_Object *object, 54 Efl_Canvas_Object *object,
55 const char *key) 55 const char *key)
diff --git a/src/lib/elementary/efl_ui_text_factory_images.eo b/src/lib/elementary/efl_ui_text_factory_images.eo
index eecc69c..42ddf13 100644
--- a/src/lib/elementary/efl_ui_text_factory_images.eo
+++ b/src/lib/elementary/efl_ui_text_factory_images.eo
@@ -1,4 +1,4 @@
1class @beta Efl.Ui.Text_Factory.Images extends Efl.Object implements Efl.Canvas.Text_Factory 1class @beta Efl.Ui.Text_Factory.Images extends Efl.Object implements Efl.Canvas.Textblock_Factory
2{ 2{
3 [[Factory that creates images given key string 3 [[Factory that creates images given key string
4 4
@@ -62,6 +62,6 @@ class @beta Efl.Ui.Text_Factory.Images extends Efl.Object implements Efl.Canvas.
62 implements { 62 implements {
63 Efl.Object.constructor; 63 Efl.Object.constructor;
64 Efl.Object.destructor; 64 Efl.Object.destructor;
65 Efl.Canvas.Text_Factory.create; 65 Efl.Canvas.Textblock_Factory.create;
66 } 66 }
67} 67}
diff --git a/src/lib/elementary/elm_deprecated.h b/src/lib/elementary/elm_deprecated.h
index ee449cc..2bb7294 100644
--- a/src/lib/elementary/elm_deprecated.h
+++ b/src/lib/elementary/elm_deprecated.h
@@ -1684,3 +1684,20 @@ EINA_DEPRECATED EAPI void elm_win_name_set(Evas_Object *obj, const char *name);
1684 * @ingroup Elm_Textpath_Group 1684 * @ingroup Elm_Textpath_Group
1685 */ 1685 */
1686EINA_DEPRECATED EAPI void elm_textpath_circle_set(Efl_Ui_Textpath *obj, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction); 1686EINA_DEPRECATED EAPI void elm_textpath_circle_set(Efl_Ui_Textpath *obj, double x, double y, double radius, double start_angle, Efl_Ui_Textpath_Direction direction);
1687
1688/**
1689 * Request that your elementary application needs elocation
1690 *
1691 * This initializes the elocation library when called and if
1692 * support exists it returns @c EINA_TRUE, otherwise returns
1693 * @c EINA_FALSE. This must be called before any elocation usage.
1694 *
1695 * @return @c EINA_TRUE if support exists and initialization succeeded.
1696 *
1697 * @since 1.8.0
1698 *
1699 * @deprecated removed beta API
1700 *
1701 * @ingroup eldbus
1702 */
1703EINA_DEPRECATED EAPI Eina_Bool elm_need_elocation(void);
diff --git a/src/lib/elementary/elm_main.c b/src/lib/elementary/elm_main.c
index 069d1ce..d6c2b2a 100644
--- a/src/lib/elementary/elm_main.c
+++ b/src/lib/elementary/elm_main.c
@@ -690,30 +690,10 @@ _elm_unneed_eldbus(void)
690 eldbus_shutdown(); 690 eldbus_shutdown();
691} 691}
692 692
693#ifdef ELM_ELOCATION
694static Eina_Bool _elm_need_elocation = EINA_FALSE;
695#endif
696EAPI Eina_Bool 693EAPI Eina_Bool
697elm_need_elocation(void) 694elm_need_elocation(void)
698{ 695{
699#ifdef ELM_ELOCATION
700 if (_elm_need_elocation) return EINA_TRUE;
701 _elm_need_elocation = EINA_TRUE;
702 elocation_init();
703 return EINA_TRUE;
704#else
705 return EINA_FALSE; 696 return EINA_FALSE;
706#endif
707}
708
709static void
710_elm_unneed_elocation(void)
711{
712#ifdef ELM_ELOCATION
713 if (!_elm_need_elocation) return;
714 _elm_need_elocation = EINA_FALSE;
715 elocation_shutdown();
716#endif
717} 697}
718 698
719static Eina_Bool _elm_need_efreet = EINA_FALSE; 699static Eina_Bool _elm_need_efreet = EINA_FALSE;
@@ -967,7 +947,6 @@ elm_quicklaunch_shutdown(void)
967 _elm_unneed_efreet(); 947 _elm_unneed_efreet();
968 _elm_unneed_e_dbus(); 948 _elm_unneed_e_dbus();
969 _elm_unneed_eldbus(); 949 _elm_unneed_eldbus();
970 _elm_unneed_elocation();
971 _elm_unneed_ethumb(); 950 _elm_unneed_ethumb();
972 _elm_unneed_web(); 951 _elm_unneed_web();
973 952
diff --git a/src/lib/elementary/elm_need.h b/src/lib/elementary/elm_need.h
index ad290db..5e873da 100644
--- a/src/lib/elementary/elm_need.h
+++ b/src/lib/elementary/elm_need.h
@@ -71,21 +71,6 @@ EAPI Eina_Bool elm_need_e_dbus(void) EINA_DEPRECATED;
71EAPI Eina_Bool elm_need_eldbus(void); 71EAPI Eina_Bool elm_need_eldbus(void);
72 72
73/** 73/**
74 * Request that your elementary application needs elocation
75 *
76 * This initializes the elocation library when called and if
77 * support exists it returns @c EINA_TRUE, otherwise returns
78 * @c EINA_FALSE. This must be called before any elocation usage.
79 *
80 * @return @c EINA_TRUE if support exists and initialization succeeded.
81 *
82 * @since 1.8.0
83 *
84 * @ingroup eldbus
85 */
86EAPI Eina_Bool elm_need_elocation(void);
87
88/**
89 * Request that your elementary application needs ethumb 74 * Request that your elementary application needs ethumb
90 * 75 *
91 * This initializes the Ethumb library when called and if support exists 76 * This initializes the Ethumb library when called and if support exists
diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h
index 0be9080..14edb8f 100644
--- a/src/lib/elementary/elm_priv.h
+++ b/src/lib/elementary/elm_priv.h
@@ -171,7 +171,6 @@
171# include <elm_general.h> 171# include <elm_general.h>
172# include <efl_text_interactive.eo.h> 172# include <efl_text_interactive.eo.h>
173# include <efl_ui_text.eo.h> 173# include <efl_ui_text.eo.h>
174# include <efl_ui_text_editable.eo.h>
175# include <efl_ui_text_async.eo.h> 174# include <efl_ui_text_async.eo.h>
176 175
177extern const char *_efl_model_property_itemw; 176extern const char *_efl_model_property_itemw;
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 2300ae0..d5960c9 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -85,7 +85,6 @@ pub_eo_files = [
85 'efl_ui_popup_part_backwall.eo', 85 'efl_ui_popup_part_backwall.eo',
86 'efl_ui_alert_popup.eo', 86 'efl_ui_alert_popup.eo',
87 'efl_ui_alert_popup_part_title.eo', 87 'efl_ui_alert_popup_part_title.eo',
88 'efl_ui_text_editable.eo',
89 'efl_ui_text_async.eo', 88 'efl_ui_text_async.eo',
90 'efl_ui_text_factory_images.eo', 89 'efl_ui_text_factory_images.eo',
91 'efl_ui_text_factory_emoticons.eo', 90 'efl_ui_text_factory_emoticons.eo',
@@ -953,7 +952,7 @@ elementary_src = [
953 952
954elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, efreet_mime, efreet_trash, eio, atspi, dl, intl] 953elementary_deps = [emile, eo, efl, edje, ethumb, ethumb_client, emotion, ecore_imf, ecore_con, eldbus, efreet, efreet_mime, efreet_trash, eio, atspi, dl, intl]
955elementary_pub_deps = [eina, eet, evas, ecore, ecore_evas, ecore_file, ecore_input, ecore_imf, ecore_con, 954elementary_pub_deps = [eina, eet, evas, ecore, ecore_evas, ecore_file, ecore_input, ecore_imf, ecore_con,
956 edje, eldbus, efreet, efreet_mime, efreet_trash, ethumb_client, efl, elocation] 955 edje, eldbus, efreet, efreet_mime, efreet_trash, ethumb_client, efl]
957 956
958elm_options = configuration_data() 957elm_options = configuration_data()
959 958
@@ -968,7 +967,6 @@ else
968 elm_options.set('DLL_EXPORT', '1') 967 elm_options.set('DLL_EXPORT', '1')
969endif 968endif
970 969
971elm_options.set('ELM_ELOCATION', '1')
972elm_options.set('ELM_EFREET', '1') 970elm_options.set('ELM_EFREET', '1')
973 971
974if config_h.has('HAVE_ALLOCA_H') 972if config_h.has('HAVE_ALLOCA_H')
diff --git a/src/lib/elocation/Elocation.h b/src/lib/elocation/Elocation.h
deleted file mode 100644
index 6ebec63..0000000
--- a/src/lib/elocation/Elocation.h
+++ /dev/null
@@ -1,433 +0,0 @@
1/**
2 * @file Elocation.h
3 * @brief Elocation Library
4 *
5 * @defgroup Location Location
6 */
7
8/**
9 * @page elocation_main Elocation (BETA)
10 *
11 * @section intro Elocation Use Cases
12 *
13 * Elocation is meant as a convenience library to ease application developers
14 * the usage of geo information in their apps. Adding a geo tag to a picture or
15 * translating an address to a GPS position and show it on a map widget are just
16 * some of the use cases.
17 *
18 * In the beginning elocation will rely on the GeoClue DBus service. Its has
19 * providers for various techniques to get hold off the current position.
20 * Ranging from GeoIP over wifi and GSM cell location to GPS. As well as
21 * provider to translates between location in a textual form to coordinates
22 * (GeoCode).
23 *
24 * Elocation covers all of these interfaces but in the end it depends on your
25 * system and the installed GeoClue providers what can be used.
26 *
27 * Currently it offer the following functionality:
28 * @li Request current address in textual form
29 * @li Request current position in GPS format
30 * @li Translate a position into and address or an address in a position
31 *
32 * You can find the API documentation at @ref Location
33*/
34#ifndef _ELOCATION_H
35#define _ELOCATION_H
36
37#ifdef EAPI
38# undef EAPI
39#endif
40
41#ifdef _WIN32
42# ifdef EFL_BUILD
43# ifdef DLL_EXPORT
44# define EAPI __declspec(dllexport)
45# else
46# define EAPI
47# endif
48# else
49# define EAPI __declspec(dllimport)
50# endif
51#else
52# ifdef __GNUC__
53# if __GNUC__ >= 4
54# define EAPI __attribute__ ((visibility("default")))
55# else
56# define EAPI
57# endif
58# else
59# define EAPI
60# endif
61#endif
62
63#ifdef EFL_BETA_API_SUPPORT
64
65#include <stdio.h>
66
67#include <Ecore.h>
68#include <Eldbus.h>
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
74/**
75 * @ingroup Location
76 * @brief Available location events that are emitted from the library
77 * @since 1.13
78 *
79 * Ecore events emitted by the library. Applications can register ecore event
80 * handlers to react on such events. After the initial query this can be used
81 * to keep track of changes and update your UI or data accordingly.
82 * @{
83 */
84EAPI extern int ELOCATION_EVENT_STATUS; /**< Status changed */
85EAPI extern int ELOCATION_EVENT_POSITION; /**< Position changed */
86EAPI extern int ELOCATION_EVENT_ADDRESS; /**< Address changed */
87EAPI extern int ELOCATION_EVENT_VELOCITY; /**< Velocity changed */
88EAPI extern int ELOCATION_EVENT_GEOCODE; /**< Reply for geocode translation arrived */
89EAPI extern int ELOCATION_EVENT_REVERSEGEOCODE; /**< Reply for geocode translation arrived */
90EAPI extern int ELOCATION_EVENT_NMEA; /**< NMEA update */
91EAPI extern int ELOCATION_EVENT_SATELLITE; /**< Satellite info changed */
92EAPI extern int ELOCATION_EVENT_POI; /**< POI reply */
93EAPI extern int ELOCATION_EVENT_META_READY; /**< Meta provider is ready to be used */
94/**@}*/
95
96/**
97 * @ingroup Location
98 * @typedef Elocation_Accuracy_Level
99 * @since 1.13
100 *
101 * Different location accuracy levels from country level up to detailed,
102 * e.g. GPS, information.
103 * @{
104 */
105typedef enum {
106 ELOCATION_ACCURACY_LEVEL_NONE = 0,
107 ELOCATION_ACCURACY_LEVEL_COUNTRY = 1,
108 ELOCATION_ACCURACY_LEVEL_REGION, /* GeoClue1 only */
109 ELOCATION_ACCURACY_LEVEL_LOCALITY, /* GeoClue1 only */
110 ELOCATION_ACCURACY_LEVEL_POSTALCODE, /* GeoClue1 only */
111 ELOCATION_ACCURACY_LEVEL_CITY = 4, /* GeoClue2 only */
112 ELOCATION_ACCURACY_LEVEL_NEIGHBORHOOD = 5, /* GeoClue2 only */
113 ELOCATION_ACCURACY_LEVEL_STREET = 6,
114 ELOCATION_ACCURACY_LEVEL_DETAILED, /* GeoClue1 only */
115 ELOCATION_ACCURACY_LEVEL_EXACT = 8, /* GeoClue2 only */
116} Elocation_Accuracy_Level;
117/**@}*/
118
119/**
120 * @ingroup Location
121 * @typedef Elocation_Resource_Flags
122 * @since 1.13
123 *
124 * Flags for available system resources to be used for locating. So far they
125 * cover physical resources like network connection, cellular network
126 * connection and GPS.
127 * @{
128 */
129typedef enum {
130 ELOCATION_RESOURCE_NONE = 0,
131 ELOCATION_RESOURCE_NETWORK = 1 << 0, /**< Internet connection is available */
132 ELOCATION_RESOURCE_CELL = 1 << 1, /**< Cell network information, e.g. GSM, is available */
133 ELOCATION_RESOURCE_GPS = 1 << 2, /**< GPS information is available */
134
135 ELOCATION_RESOURCE_ALL = (1 << 10) - 1 /**< All resources are available */
136} Elocation_Resource_Flags;
137/**@}*/
138
139/**
140 * @ingroup Location
141 * @typedef Elocation_Accuracy
142 * @since 1.13
143 *
144 * Information about the accuracy of the reported location. For details about
145 * the level of accuracy see #Elocation_Accuracy_Level. It also covers
146 * horizontal and vertical accuracy. The values depend on the used provider
147 * and may very in quality.
148 */
149typedef struct _Elocation_Accuracy
150{
151 Elocation_Accuracy_Level level;
152 double horizontal;
153 double vertical;
154} Elocation_Accuracy;
155
156/**
157 * @ingroup Location
158 * @typedef Elocation_Address
159 * @since 1.13
160 *
161 * Location information in textual form. Depending on the used provider this
162 * can cover only the country or a detailed address with postcode and street.
163 * The level of detail varies depending on the used provider.
164 * A timestamp is available to calculate the age of the address data.
165 */
166typedef struct _Elocation_Address
167{
168 unsigned int timestamp; /**< Timestamp of data read out in seconds since epoch */
169 char *country;
170 char *countrycode;
171 char *locality;
172 char *postalcode;
173 char *region;
174 char *timezone;
175 Elocation_Accuracy *accur;
176} Elocation_Address;
177
178/**
179 * @ingroup Location
180 * @typedef Elocation_Position
181 * @since 1.13
182 *
183 * Location information based on the GPS grid. Latitude, longitude and altitude.
184 * A timestamp is available to calculate the age of the address data.
185 */
186typedef struct _Elocation_Position
187{
188 unsigned int timestamp; /**< Timestamp of data read out in seconds since epoch */
189 double latitude;
190 double longitude;
191 double altitude;
192 Elocation_Accuracy *accur;
193} Elocation_Position;
194
195/**
196 * @ingroup Location
197 * @typedef Elocation_Velocity
198 * @since 1.13
199 *
200 * Velocity information. So far this interface is only offered with GPS based
201 * providers. It offers information about speed, direction and climb.
202 * A timestamp is available to calculate the age of the address data.
203 *
204 * FIXME: check units and formats of this values coming in from GeoClue
205 */
206typedef struct _Elocation_Velocity
207{
208 unsigned int timestamp; /**< Timestamp of data read out in seconds since epoch */
209 double speed;
210 double direction;
211 double climb;
212} Elocation_Velocity;
213
214/**
215 * @ingroup Location
216 * @typedef Elocation_Requirements
217 * @since 1.13
218 *
219 * Requirement settings for the location provider. Requirements can be a level
220 * of accuracy or allowed resources like network access or GPS. See
221 * #Elocation_Resource_Flags for all available resource flags.
222 *
223 * Based on this setting the best provider is chosen between the available
224 * providers of GeoClue.
225 */
226typedef struct _Elocation_Requirements
227{
228 Elocation_Accuracy_Level accurancy_level;
229 int min_time; /**< Minimal time between updates. Not implemented upstream */
230 Eina_Bool require_update;
231 Elocation_Resource_Flags allowed_resources;
232} Elocation_Requirements;
233
234/**
235 * @brief Create a new address object to operate on.
236 * @return Address object.
237 *
238 * The returned address object is safe to be operated on. It can be used for
239 * all other elocation functions. Once finished with it it need to be destroyed
240 * with a call to #elocation_address_free.
241 *
242 * @ingroup Location
243 * @since 1.13
244 */
245EAPI Elocation_Address *elocation_address_new(void);
246
247/**
248 * @brief Free an address object
249 * @param address Address object to be freed.
250 *
251 * Destroys an address object created with #elocation_address_new. Should be
252 * used during the cleanup of the application or whenever the address object is
253 * no longer needed.
254 *
255 * @ingroup Location
256 * @since 1.13
257 */
258EAPI void elocation_address_free(Elocation_Address *address);
259
260/**
261 * @brief Create a new position object to operate on.
262 * @return Position object.
263 *
264 * The returned address object is safe to be operated on. It can be used for
265 * all other elocation functions. Once finished with it it need to be destroyed
266 * with a call to #elocation_address_free.
267 *
268 * @ingroup Location
269 * @since 1.13
270 */
271EAPI Elocation_Position *elocation_position_new(void);
272
273/**
274 * @brief Free an position object
275 * @param position Position object to be freed.
276 *
277 * Destroys a position object created with #elocation_address_new. Should be
278 * used during the cleanup of the application or whenever the location object is
279 * no longer needed.
280 *
281 * @ingroup Location
282 * @since 1.13
283 */
284EAPI void elocation_position_free(Elocation_Position *position);
285
286/**
287 * @brief Get the current address information.
288 * @param address Address struct to be filled with information.
289 * @return EINA_TRUE for success and EINA_FALSE for failure.
290 *
291 * Request the latest address. The requested to the underling components might
292 * be asynchronous so better check the timestamp if the data has changed. To get
293 * events when the address changes one can also subscribe to the
294 * #ELOCATION_EVENT_ADDRESS ecore event which will have the address object as
295 * event.
296 *
297 * @ingroup Location
298 * @since 1.13
299 */
300EAPI Eina_Bool elocation_address_get(Elocation_Address *address);
301
302/**
303 * @brief Get the current position information.
304 * @param position Position struct to be filled with information.
305 * @return EINA_TRUE for success and EINA_FALSE for failure.
306 *
307 * Request the latest position. The requested to the underling components might
308 * be asynchronous so better check the timestamp if the data has changed. To get
309 * events when the position changes one can also subscribe to the
310 * #ELOCATION_EVENT_POSITION ecore event which will have the position object as
311 * event.
312 *
313 * @ingroup Location
314 * @since 1.13
315 */
316EAPI Eina_Bool elocation_position_get(Elocation_Position *position);
317
318/**
319 * @brief Get the current status.
320 * @param status Status
321 * @return EINA_TRUE for success and EINA_FALSE for failure.
322 *
323 * @ingroup Location
324 * @since 1.13
325 */
326EAPI Eina_Bool elocation_status_get(int *status);
327
328/**
329 * @brief Set the requirements.
330 * @param requirements Requirements
331 * @return EINA_TRUE for success and EINA_FALSE for failure.
332 *
333 * Set the requirements for selecting a provider.
334 *
335 * @ingroup Location
336 * @since 1.13
337 */
338EAPI Eina_Bool elocation_requirements_set(Elocation_Requirements *requirements);
339
340/**
341 * @brief Convert position to address
342 * @param position_shadow Position input
343 * @param address_shadow Address output
344 * @return EINA_TRUE for success and EINA_FALSE for failure.
345 *
346 * Use a GeoCode provider to translate from a given GPS coordinate
347 * representation of a location to a representation in textual form.
348 *
349 * @ingroup Location
350 * @since 1.13
351 */
352EAPI Eina_Bool elocation_position_to_address(Elocation_Position *position_shadow, Elocation_Address *address_shadow);
353
354/**
355 * @brief Convert address to position
356 * @param address_shadow Address input
357 * @param position_shadow Position output
358 * @return EINA_TRUE for success and EINA_FALSE for failure.
359 *
360 * Use a GeoCode provider to translate from a given textual form
361 * representation of a location to a representation as GPS coordinates.
362 *
363 * @ingroup Location
364 * @since 1.13
365 */
366EAPI Eina_Bool elocation_address_to_position(Elocation_Address *address_shadow, Elocation_Position *position_shadow);
367
368/**
369 * @brief Convert free form address tring to position
370 * @param freeform_address Address string in free form
371 * @param position_shadow Position output
372 * @return EINA_TRUE for success and EINA_FALSE for failure.
373 *
374 * Similar GeoCode translation from textual form to GPS coordinates as
375 * #elocation_address_to_position but in this case the address is a simple
376 * string which hopefully contains enough information for the provider to
377 * understand and translate.
378 *
379 * Useful for an easy search interface in an application but also more error
380 * prone regarding correct results.
381 *
382 * @ingroup Location
383 * @since 1.13
384 */
385EAPI Eina_Bool elocation_freeform_address_to_position(const char *freeform_address, Elocation_Position *position_shadow);
386
387/**
388 * @brief Request a landmark position
389 * @param position_shadow Position ouput
390 * @param address_shadow Address input
391 * @return EINA_TRUE for success and EINA_FALSE for failure.
392 *
393 * Request a landmark position also known as Point Of Interest (POI) from
394 * GeoClue.
395 *
396 * @ingroup Location
397 * @since 1.13
398 */
399EAPI Eina_Bool elocation_landmarks_get(Elocation_Position *position_shadow, Elocation_Address *address_shadow);
400
401/**
402 * @brief Initialize the elocation subsystem.
403 * @return EINA_TRUE for success and EINA_FALSE for failure.
404 *
405 * This function must be called before using any of the Elocation functionality
406 * in your application to make sure it it setup correctly for usage.
407 *
408 * @ingroup Location
409 * @since 1.13
410 */
411EAPI Eina_Bool elocation_init(void);
412
413/**
414 * @brief Cleanup and shutdown the elocation subsystem.
415 *
416 * This function must be called when the application is no longer using any of
417 * the Elocation functionality to allow the subsystem to shutdown cleanly.
418 *
419 * @ingroup Location
420 * @since 1.13
421 */
422EAPI void elocation_shutdown(void);
423
424#ifdef __cplusplus
425}
426#endif
427
428#endif /* BETA API */
429
430#undef EAPI
431#define EAPI
432
433#endif
diff --git a/src/lib/elocation/elocation.c b/src/lib/elocation/elocation.c
deleted file mode 100644
index 33c77d2..0000000
--- a/src/lib/elocation/elocation.c
+++ /dev/null
@@ -1,1414 +0,0 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#include <stdio.h>
6
7#include <Eina.h>
8#include <Ecore.h>
9#include <Eldbus.h>
10#include <Elocation.h>
11#include <elocation_private.h>
12
13/* FIXME: These globals really need to get reduced before leaving the PROTO
14 * area.
15 */
16static char *unique_name = NULL;
17static Eldbus_Connection *conn = NULL;
18static Elocation_Provider *address_provider = NULL;
19static Elocation_Provider *position_provider = NULL;
20static Eldbus_Object *obj_meta = NULL;
21static Eldbus_Proxy *manager_master = NULL;
22static Eldbus_Proxy *meta_geoclue = NULL;
23static Eldbus_Proxy *meta_address = NULL;
24static Eldbus_Proxy *meta_position = NULL;
25static Eldbus_Proxy *meta_masterclient = NULL;
26static Eldbus_Proxy *meta_velocity = NULL;
27static Eldbus_Proxy *meta_nmea = NULL;
28static Eldbus_Proxy *meta_satellite = NULL;
29static Eldbus_Proxy *geonames_geocode = NULL;
30static Eldbus_Proxy *geonames_rgeocode = NULL;
31static Eldbus_Proxy *master_poi = NULL;
32static Elocation_Address *address = NULL;
33static Elocation_Position *position = NULL;
34static Elocation_Address *addr_geocode = NULL;
35static Elocation_Position *pos_geocode = NULL;
36static Elocation_Velocity *velocity = NULL;
37static int status = -1; /* 0 is a valid status code */
38static char nmea_sentence[256];
39
40int _elocation_log_dom = -1;
41
42/* Elocation ecore event types we provide to the application. */
43EAPI int ELOCATION_EVENT_STATUS = 0;
44EAPI int ELOCATION_EVENT_POSITION = 0;
45EAPI int ELOCATION_EVENT_ADDRESS = 0;
46EAPI int ELOCATION_EVENT_VELOCITY = 0;
47EAPI int ELOCATION_EVENT_GEOCODE = 0;
48EAPI int ELOCATION_EVENT_REVERSEGEOCODE = 0;
49EAPI int ELOCATION_EVENT_NMEA = 0;
50EAPI int ELOCATION_EVENT_SATELLITE = 0;
51EAPI int ELOCATION_EVENT_POI = 0;
52EAPI int ELOCATION_EVENT_META_READY = 0;
53
54/* Internal events */
55int ELOCATION_EVENT_IN = 0;
56int ELOCATION_EVENT_OUT = 0;
57
58static void
59_dummy_free(void *user_data EINA_UNUSED, void *func_data EINA_UNUSED)
60{
61 /* Don't free the event data after dispatching the event. We keep track of
62 * it on our own
63 */
64}
65
66/* Generic provider message unmarshaller. Used from all different provider
67 * calbacks that receive such a message
68 */
69static Eina_Bool
70unmarshall_provider(const Eldbus_Message *reply, Elocation_Provider *provider)
71{
72 char *name = NULL, *desc = NULL, *service = NULL, *path = NULL;
73
74 if (!eldbus_message_arguments_get(reply, "ssss", &name, &desc, &service, &path))
75 return EINA_FALSE;
76
77 provider->name = strdup(name);
78 provider->description = strdup(desc);
79 provider->service = strdup(service);
80 provider->path = strdup(path);
81 return EINA_TRUE;
82}
83
84static void
85meta_address_provider_info_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending EINA_UNUSED)
86{
87 const char *err, *errmsg;
88 Elocation_Provider *addr_provider;
89
90 addr_provider = data;
91
92 if (eldbus_message_error_get(reply, &err, &errmsg))
93 {
94 ERR("Error: %s %s", err, errmsg);
95 return;
96 }
97
98 if (!unmarshall_provider(reply, addr_provider))
99 {
100 ERR("Error: Unable to unmarshall address provider");
101 return;
102 }
103
104 DBG("Meta address provider name: %s, %s, %s, %s", addr_provider->name,
105 addr_provider->description,
106 addr_provider->service,
107 addr_provider->path);
108}
109
110static void
111meta_position_provider_info_cb(void *data, const Eldbus_Message *reply, Eldbus_Pending *pending EINA_UNUSED)
112{
113 const char *err, *errmsg;
114 Elocation_Provider *pos_provider;
115
116 pos_provider = data;
117
118 if (eldbus_message_error_get(reply, &err, &errmsg))
119 {
120 ERR("Error: %s %s", err, errmsg);
121 return;
122 }
123
124 if (!unmarshall_provider(reply, pos_provider))
125 {
126 ERR("Error: Unable to unmarshall position provider");
127 return;
128 }
129
130 DBG("Meta position provider name: %s, %s, %s, %s", pos_provider->name,
131 pos_provider->description,
132 pos_provider->service,
133 pos_provider->path);
134}
135
136static void
137meta_address_provider_info_signal_cb(void *data, const Eldbus_Message *reply)
138{
139 Elocation_Provider *addr_provider;
140 addr_provider = data;
141
142 if (!unmarshall_provider(reply, addr_provider))
143 {
144 ERR("Error: Unable to unmarshall address provider");
145 return;
146 }
147
148 DBG("Meta address provider name changed: %s, %s, %s, %s", addr_provider->name,
149 addr_provider->description,
150 addr_provider->service,
151 addr_provider->path);
152}
153
154static void
155meta_position_provider_info_signal_cb(void *data, const Eldbus_Message *reply)
156{
157 Elocation_Provider *pos_provider;
158 pos_provider = data;
159
160 if (!unmarshall_provider(reply, pos_provider))
161 {
162 ERR("Error: Unable to unmarshall position provider");
163 return;
164 }
165
166 DBG("Meta position provider name changed: %s, %s, %s, %s", pos_provider->name,
167 pos_provider->description,
168 pos_provider->service,
169 pos_provider->path);
170}
171
172/* A address is quite flexible what kind of key value pairs it contains in the
173 * dict. Similar to a reverse GeoCode message as both return an address object.
174 */
175static Eina_Bool
176unmarshall_address(const Eldbus_Message *reply, Elocation_Address *addr)
177{
178 int32_t level, timestamp;
179 Eldbus_Message_Iter *sub, *dict, *entry;
180 double horizontal;
181 double vertical;
182 const char *key, *signature;
183 char *value;
184
185 signature = eldbus_message_signature_get(reply);
186
187 if (!strcmp(signature, "ia{ss}(idd)"))
188 {
189 if (!eldbus_message_arguments_get(reply, "ia{ss}(idd)", &timestamp, &dict, &sub))
190 return EINA_FALSE;
191 addr->timestamp = timestamp;
192 }
193 else if (!strcmp(signature, "a{ss}(idd)"))
194 {
195 if (!eldbus_message_arguments_get(reply, "a{ss}(idd)", &dict, &sub))
196 return EINA_FALSE;
197 addr->timestamp = 0;
198 }
199 else
200 return EINA_FALSE;
201
202
203 /* Cleanup potential old entries before re-using */
204 addr->country = NULL;
205 addr->countrycode = NULL;
206 addr->locality = NULL;
207 addr->postalcode = NULL;
208 addr->region = NULL;
209 addr->timezone = NULL;
210
211 while (eldbus_message_iter_get_and_next(dict, 'e', &entry))
212 {
213 if (!eldbus_message_iter_arguments_get(entry, "ss", &key, &value))
214 continue;
215
216 if (!strcmp(key, "country"))
217 {
218 free(addr->country);
219 addr->country = strdup(value);
220 }
221 else if (!strcmp(key, "countrycode"))
222 {
223 free(addr->countrycode);
224 addr->countrycode = strdup(value);
225 }
226 else if (!strcmp(key, "locality"))
227 {
228 free(addr->locality);
229 addr->locality = strdup(value);
230 }
231 else if (!strcmp(key, "postalcode"))
232 {
233 free(addr->postalcode);
234 addr->postalcode = strdup(value);
235 }
236 else if (!strcmp(key, "region"))
237 {
238 free(addr->region);
239 addr->region = strdup(value);
240 }
241 else if (!strcmp(key, "timezone"))
242 {
243 free(addr->timezone);
244 addr->timezone = strdup(value);
245 }
246 }
247
248 if (!eldbus_message_iter_arguments_get(sub, "idd", &level, &horizontal, &vertical))
249 return EINA_FALSE;
250
251 addr->accur->level = level;
252 addr->accur->horizontal = horizontal;
253 addr->accur->vertical = vertical;
254 return EINA_TRUE;
255}
256
257/* Receive and unmarshall a reverse GeoCode message. The dict can contain a
258 * variable set of key value pairs so we need to handle this with care
259 */
260static void
261rgeocode_cb(void *data EINA_UNUSED, const Eldbus_Message *reply, Eldbus_Pending *pending EINA_UNUSED)
262{
263 const char *err, *errmsg;
264
265 if (eldbus_message_error_get(reply, &err, &errmsg))
266 {
267 ERR("Error: %s %s", err, errmsg);
268 return;
269 }
270
271 if (!unmarshall_address(reply, addr_geocode))
272 {
273 ERR("Error: Unable to unmarshall address");
274 return;
275 }
276
277 /* Send out an event to all interested parties that we have an update */
278 ecore_event_add(ELOCATION_EVENT_REVERSEGEOCODE, addr_geocode, _dummy_free, NULL);
279}
280
281/* Point of Interest (POI) aka landmark message unmarshalling. Thsi interface is
282 * not in standard GeoClue but currently a Tizen extension.
283 */
284static void
285poi_cb(void *data EINA_UNUSED, const Eldbus_Message *reply, Eldbus_Pending *pending EINA_UNUSED)
286{
287 int32_t count, id, rank;
288 double lat, lon, bound_left, bound_top, bound_right, bound_bottom;
289 const char *name, *icon, *house, *road, *village, *suburb, *postcode;
290 const char *city, *county, *country, *country_code;
291 Eldbus_Message_Iter *array, *struct_landmark;
292 const char *err, *errmsg;
293
294 if (eldbus_message_error_get(reply, &err, &errmsg))
295 {
296 ERR("Error: %s %s", err, errmsg);
297 return;
298 }
299
300 /* Yeah, its quite a horrible message. The POI interface could use a better design */
301 if (!eldbus_message_arguments_get(reply, "ia(iiddddddsssssssssss", &count ,&array))
302 return;
303
304 /* TODO re-check that the parameter ordering is what we expect */
305 while (eldbus_message_iter_get_and_next(array, 'r', &struct_landmark))
306 {
307 if (!eldbus_message_iter_arguments_get(struct_landmark, "iiddddddsssssssssss", &id, &rank,
308 &lat, &lon, &bound_left, &bound_top, &bound_right,
309 &bound_bottom, &name, &icon, &house, &road,
310 &village, &suburb, &postcode, &city, &county,
311 &country, &country_code))