Commit Graph

303 Commits

Author SHA1 Message Date
Jaehyun Cho db2d711d64 [elm_widget] Enable not to add resize object to or delete resize object from sub object when the resize object is set.
Summary: Add one more argument, 'Eina_Bool sub_object' to elm_widget_resize_object_set. If the argument, 'sub_object' is set as EINA_TRUE, the new resize object is added to the sub object and the previous resize object is deleted from the sub object.

Reviewers: Hermet, seoz

CC: Jaehyun_Cho, seoz, raster

Differential Revision: https://phab.enlightenment.org/D265
2013-10-17 01:19:40 +09:00
Daniel Juyung Seo 6397761c6a elm_test: Fixed formatting. tab to space.
Changed tab to space before working on the code.
Kinda surprised by the number of tabs we had.
2013-10-14 19:12:32 +09:00
Daniel Juyung Seo aa5934c029 elm_map.c: adopted ELM_WIDGET_DATA_GET_OR_RETURN macro. 2013-10-05 17:14:50 +09:00
Cedric Bail 29af5e1e43 elementary: update to new eo_parent_get/set API. 2013-09-25 13:34:27 +09:00
Carsten Haitzler a86577f051 elm map - let's use some neautral colors for map items by default. 2013-09-10 18:49:12 +09:00
ChunEon Park d461a8be05 elementary/widgets - set parents before widget constructs their body.
This avoids unnecessary multiple setups when obj and subobj has connected.
2013-08-27 14:19:19 +09:00
Carsten Haitzler 59e8bc5a35 Fix elm to use key not keyname (so xmodmap works) 2013-07-31 15:16:41 +09:00
Daniel Juyung Seo 6cf684f02a elm: added more "focused" and "unfocused" documentations.
genlist, hover, index, list, map, photocam, progressbar, radio, scroller, slider, slideshow, spinner, toolbar, win.
2013-06-10 14:13:55 +09:00
Daniel Juyung Seo 8bfdbd2ba6 elm: all the focusable widget now emits "focused" and "unfocused" smart callbacks.
1. documentations, NEWS, and ChangeLog will be updated later after some more test.
2. need to check entry.
2013-06-07 01:13:37 +09:00
Daniel Juyung Seo fce66c4296 elm_map.c: ELM_SAFE_FREE adoption.
I splited ELM_SAFE_FREE refactoring patches. One commit per each file as recommended.
For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
2013-05-29 21:03:51 +09:00
Daniel Juyung Seo 5f053bf79a elm: refactoring. use more ELM_FREE_FUNC. 2013-05-23 15:54:49 +09:00
Cedric Bail c929b33052 elementary: properly sanitize headers order. 2013-05-03 16:07:06 +09:00
Daniel Zaoui 187d6bf8de Elementary: replace eo_data_get for objects data referencing. 2013-05-01 11:04:09 +03:00
Daniel Juyung Seo ba4dbce9d9 elm: enhance eina_list_free usages. use EINA_LIST_FREE if needed. 2013-04-10 20:28:35 +09:00
Daniel Juyung Seo 74b3eed5fd elm: print the error message inside elm_widget_sub_object_add().
1. Do not need to print the same error message from all the widget codes.
2. Even though elm_widget_sub_object_add() can be used internally, there should be no error message at all.
   Elm devs should fix it beforehand.
   So it looks ok to print the error message in elm_widget_sub_object_add() to force elm devs to fix it.
3. Got additional code cleanups.
2013-04-03 11:28:53 +09:00
ChunEon Park a7cca7ba3f elementary/map - map supports language,changed 2013-03-29 20:53:11 +09:00
Tom Hacohen d75cb616da Change usage of eo_do_super to the new prototype. 2013-03-18 16:15:12 +00:00
Daniel Juyung Seo 78c042cdbe elm *.c: fixed formatting with EINA_LIST_FREE.
EINA_LIST_FREE (xxx) -> EINA_LIST_FREE(xxx)
2013-03-09 13:23:42 +09:00
Gustavo Lima Chaves 312d0217a0 An internal layout error, on a widget set, is a CRITICAL error. 2013-03-01 23:04:31 -03:00
Jaehwan Kim d58d971e6f Add the option about sending signals in content_pos_set.
When the scroller is resized, the signals("elm,action,scroll", "elm,edge,top" so on) shouldn't be sent,
because it's not a scroll-action. So in this case, the content_pos_set should be called without the signals.
2013-02-28 15:18:51 +09:00
Carsten Haitzler 13a895de77 Fix 1byte invalid read & do memset, rewind if needed.
Summary:
1. because eina_simple_xml_parse uses char *, buf should be null
terminated.  So I use memset.
2. Because NULL is needed at the end, I add one more byte.
fread read exact bytes and has no NULL.
3. If buf is failed to alloc (very rarely case), it is not need to rewind and memset.

Test Plan: Use valgrind and elm_map_name_add API

Reviewers: tasn, bluezery

Reviewed By: raster

CC: seoz

Differential Revision: https://phab.enlightenment.org/D10
2013-02-25 12:00:07 +09:00
Stefan Schmidt 7129201160 elm_map: Free allocated buffer in all cases.
Very well spotted from Hermet. My original fix only free'ed the buffer
in the case fread failed, but apperently we we always leaked this buffer.

Make sure we free it in all cases.

SVN revision: 84087
2013-02-19 09:04:45 +00:00
ChunEon Park 844b5805ff elementary/widget - don't handle tthe resize objects in widget infrastructure. Acutally these resize objects are sub objects so we don't need to care them separately. This caused overhead in some cases(ie, theme change)
SVN revision: 83990
2013-02-16 13:39:59 +00:00
Daniel Zaoui cdd1eea853 Replace supported_types
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>

SVN revision: 83803
2013-02-10 07:52:31 +00:00
ChunEon Park 5122a4d821 elementary/map - allocate memory only when it needs
SVN revision: 82850
2013-01-16 03:37:32 +00:00
Daniel Juyung Seo c712b3ce57 elm map: Fixed formatting.
SVN revision: 82465
2013-01-09 15:34:59 +00:00
Jaehwan Kim 6f2142abe9 Fix out-of-bounds read
SVN revision: 82455
2013-01-09 11:47:11 +00:00
ChunEon Park 244b790c58 elementary/map - fixed more insane free in map
SVN revision: 82443
2013-01-09 08:49:30 +00:00
ChunEon Park 0b6a6dfc08 elementary/map - fixed memory leak
SVN revision: 82442
2013-01-09 08:40:56 +00:00
Stefan Schmidt d0793194b5 elm/map: Free buffer on error path
SVN revision: 81342
2012-12-19 10:28:20 +00:00
Cedric BAIL bb6589c3f1 elementary: fix forgotten break.
SVN revision: 80319
2012-12-06 08:59:14 +00:00
Yakov Goldberg 5c98343198 We have ported to Eo all the widgets of elementary. We didn't change the inheritance itself, only the mechanism, as done previously in Evas, Ecore and Edje. We removed totally the previous inheritance mechanism.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>
Signed-off-by: Daniel Zaoui <daniel.zaoui@samsung.com>

SVN revision: 79668
2012-11-26 06:32:53 +00:00
Bluezery c1db5c3bd2 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [E-Devel][Patch][Elementary]Map: Remove delayed job

This patch removes delayed jobs in elm_map.
Previously delayed job is used for queuing the zooming & zoom mode
changing & overlay_showing API requests. Queued jobs are all executed
when pan is calculated.
But actually queued jobs are not needed to be  executed. Just last
jobs are needed to be executed per pan calculation.
So I removed delayed jobs and fill calc job functions to be executed
while calculation is executed.



SVN revision: 79269
2012-11-14 07:10:24 +00:00
Carsten Haitzler c2f161fb3d typo--
SVN revision: 77957
2012-10-13 12:59:39 +00:00
Michael BOUCHAUD a1661712da elementary: elm_map use now image proxy and do some cleaning in theme, big thx to Bluezery !
SVN revision: 77939
2012-10-12 14:51:45 +00:00
Michael BOUCHAUD b6c771c97c elementary: add elm_map_name_search
SVN revision: 77935
2012-10-12 10:27:08 +00:00
Michael BOUCHAUD fc1d6f99de elementary: remove unneeded code & add some prevent code in elm_map. Patch from Bluezery, thx :)
SVN revision: 77756
2012-10-10 12:29:08 +00:00
Michael BOUCHAUD 881c36211c elementary: fix calculation of scale table, thx to Bluezery
SVN revision: 77620
2012-10-09 08:18:28 +00:00
Daniel Juyung Seo 30dba54610 elm: Fixed indentations for EINA_LIST/INLIST_FOREACH(_SAFE).
SVN revision: 77244
2012-10-01 07:36:27 +00:00
Cedric BAIL 4f0e673c1d elementary: build elm map correctly without Ecore_Con.
SVN revision: 76968
2012-09-21 13:12:02 +00:00
Bluezery f74bda827d From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [patch] change plug-in loading behavior in elm_map

Elm_map have 3 modules (Tile, Route, Name) for plug-in loading
When elm_map is added, each 3 modules search plug-ins
(elm_map does use eina_module, not elm_module because elm_map loads
several modules. )

Previously, Each modules in elm_map search modules separately.
So module init /shutdown function in each plug-in is called 3times.
This can cause problems.
I fixed that module init is called at one time and module never be
unloaded (in process life-cycle).



SVN revision: 75974
2012-09-03 08:35:53 +00:00
Gustavo Lima Chaves 50305f191b [elm] Map now inheritable.
SVN revision: 74610
2012-07-30 22:36:50 +00:00
Gustavo Lima Chaves 6b109ac32f [elm] Map now using the scrollable interface.
SVN revision: 74194
2012-07-19 20:26:09 +00:00
Gustavo Lima Chaves cd1f900a46 [elm] Forgotten elm icon function to deprecate in favor of an image one.
SVN revision: 73017
2012-06-28 18:40:35 +00:00
Davide Andreoli a6a41f5717 elm_map: add elm_map_overlay_del_cb_set() to get notified when an overlay is deleted.
SVN revision: 72233
2012-06-16 12:50:54 +00:00
Mike Blumenkrantz 1913c99bc1 ticket #902: elementary saves map data into /tmp
now we use XDG_CACHE_HOME


SVN revision: 72035
2012-06-12 14:50:15 +00:00
Davide Andreoli 9b72ec0dea another non premul color
SVN revision: 71970
2012-06-11 23:56:01 +00:00
Davide Andreoli 5a1213ec8c evas only handle premul colors (note: not making any news or bp)
SVN revision: 71965
2012-06-11 23:25:43 +00:00
Gustavo Lima Chaves bbf0a4345e [elm] And now remove deprecated calls usage (WRT
icon/image thing).



SVN revision: 71473
2012-05-28 21:50:11 +00:00
Bluezery bfff7d7836 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add New "loaded" signal

I want to add new "loaded" signal to elementary map. This signal
notify users when all map tiles are loaded. Timer is used for this signal.
Currently "tile,loaded" can be used for each separated tile.  So the
users are hard to know whether all tiles are loaded or not.
Please review this patch.



SVN revision: 71406
2012-05-24 10:07:56 +00:00
Bluezery 3bada185c3 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add elm_map_overlays_get &
elm_map_overlay_visible_get

I want to add 2 new APIs (elm_map_overlays_get & elm_map_overlay_visible_get).

There are no way to get the group overlays because group overlay,
something like virtual overlay, is created and deleted dynamically.
So elm_map_overlays_get returns total overlay's list and user can get
any type of overlays including group overlays.
Overlays which is grouped can not be visible. Because overlay grouping
is performed by elm_map, user do not know whether overlays are visible
or not. So elm_map_overlay_visible_get is added for this reason.



SVN revision: 71354
2012-05-23 10:29:03 +00:00
Carsten Haitzler d76345fc8a use profate atof that fixes up locale issues for string -> float
conversion.



SVN revision: 70485
2012-04-26 03:32:18 +00:00
Carsten Haitzler ba30effc3c lets not use a string wer just freed ok?
SVN revision: 70460
2012-04-25 08:56:25 +00:00
Carsten Haitzler 3a7b769a63 use the new escape text set to clear up issues if theme has TEXT vs
TEXTBLOCK items and handling escapes so text is consistend across elm.
fiuxes the fileselector issues kai reported.



SVN revision: 70362
2012-04-20 12:51:10 +00:00
Jihoon Kim 7046f87e3a elementary: ignore key event of keypad when NumLock is turned on in win, scroller, slider, video, photocam, map, slideshow, and spinner.
SVN revision: 69952
2012-04-06 10:34:03 +00:00
Daniel Juyung Seo 8c17d99712 elm: Fixed formatting. Added a space after 'if/while/for'
SVN revision: 69744
2012-03-29 11:09:45 +00:00
Sanjeev BA 710d49b9fd Fix related zoom
Author : Bluezery <ohpowel@gmail.com>

SVN revision: 69590
2012-03-23 11:15:01 +00:00
Sanjeev BA f1c642d3d0 Callback parameter should be Widget_Data, not Evas_Object.
Author : Bluezery <ohpowel@gmail.com>

SVN revision: 69577
2012-03-23 05:36:11 +00:00
Daniel Juyung Seo a40e45f37c elm map: Removed unused codes. Patch by Bluezery <ohpowel@gmail.com>
On Thu, Mar 22, 2012 at 9:38 PM, Bluezery <ohpowel@gmail.com> wrote:
> Hello,
>
> Now, Elm_Map_Marker, Elm_Map_Marker_Class, Elm_Map_Group_Class,
> Marker_Bubble are not used anymore.  So I removed all things related
> those in elm_map.
> Please review this patch.
> Thanks
>

SVN revision: 69571
2012-03-23 01:29:32 +00:00
Bluezery 9e3b73137b From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add line, polygon, circle, scale
overlay

This patch adds new overlay APIs (line, polygon, circle, scale) for elm_map.
These overlays are adhered to map even though zooming, panning.
You can test these by doing "elementary_test --> click mouse right -->
overlay"



SVN revision: 69562
2012-03-22 10:40:04 +00:00
Bluezery 6309c07b04 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Map overlay color & grouping &
route Fix

This is patch for elm_map

1. Default and Class overlay can be set color by
elm_map_overlay_color_set().
2. Fix test application  for map API testing more.
3. Fix grouping for enabling group callbacks. If overlay group is
clicked, callback will be called.
And elm_map_overlay_group_members_set() API will be added later to get
list of overlays in the group.
4. Simplify route overlay: Previously, many polygon objects are needed
for one route overlay.
But now  just one is needed.



SVN revision: 69554
2012-03-22 05:23:19 +00:00
Sanjeev BA 1e1f9f6dd9 elm_map - Bug fix and cleanup.
Author : Bluezery <ohpowel@gmail.com>

SVN revision: 69519
2012-03-20 07:37:59 +00:00
Jiyoun Park d80db2c0b5 remove elm_map_marker_XXX
SVN revision: 69451
2012-03-16 08:02:33 +00:00
Jiyoun Park 08718ae177 remove elm_map_group_class_style_set
elm_map_group_class_icon_cb_set
elm_map_group_class_data_set
elm_map_group_class_zoom_displayed_set
elm_map_group_class_zoom_grouped_set
elm_map_group_class_hide_set


SVN revision: 69320
2012-03-14 07:13:40 +00:00
Jiyoun Park a4fc7e032e remove elm_map_marker_class_style_set
elm_map_marker_class_icon_cb_set
elm_map_marker_class_get_cb_set
elm_map_marker_class_del_cb_set


SVN revision: 69319
2012-03-14 07:00:43 +00:00
Jiyoun Park ee45e2dd0f remove elm_map_route_color_get/set
SVN revision: 69317
2012-03-14 06:51:35 +00:00
Jiyoun Park 346b8647a2 remove code related with
ELM_MAP_ROUTE_SOURCE_
elm_map_utils_rotate_coord
elm_map_utils_convert_
elm_map_utils_downloading_status_get
elm_map_canvas_to_geo_convert
elm_map_geo_region_
elm_map_source_zoom_
elm_map_source_name
elm_map_route_source
elm_map_max_marker_per
elm_map_paused_markers

elm_map_name_remove
which was deprecated


SVN revision: 69167
2012-03-10 10:07:27 +00:00
Cedric BAIL fdfcdda4a0 elementary: fix build with elm_map turned off.
SVN revision: 69041
2012-03-08 09:42:41 +00:00
cnook 6477874b2f From: cnook <kimcinoo@gmail.com>
Subject: [E-devel] [Patch][elementary_test] test_label

I have attached a patch for test_label. Please review the patch and
give any feedbacks. Thanks.



SVN revision: 68949
2012-03-07 13:50:37 +00:00
Bluezery 8479b5f328 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Change & Add map APIs

I rename & add some APIs.
As previously discussed, I categorized map APIs.
(http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2)

1) Zoom
elm_map_zoom_set/get
elm_map_zoom_mode_set/get
elm_map_zoom_min_set/get
elm_map_zoom_max_set/get

2) Region - Geographic coordinates (region)
elm_map_region_get
elm_map_region_show/bring_in
elm_map_canvas_to_region_convert

I will not use "_geo_" in map APIs. All map APIs are basically used by
geographic coordinates.

3) Property
elm_map_paused_set/get
elm_map_rotate_set/get
elm_map_wheel_disabled_set/get
elm_map_user_agent_set/get

4) Overlay
elm_map_overlay_add/del
elm_map_overlay_xxx
elm_map_overlay_class_xxx
elm_map_overlay_bubble_xxx
elm_map_overlay_route_xxx

I will add line, rectangle, poi overlays  ASAP.

5) Source - External Provider  (Tile, Route, Name, )
elm_map_sources_get
elm_map_source_set/get

I will add more provider ASAP such as POI, etc.

6) Route
elm_map_route_add/del
elm_map_route_distance_get
elm_map_route_node_get
elm_map_route_waypoints_get

7) Name
elm_map_name_add/del
elm_map_route_address_get
elm_map_route_region_get

6) Route and 7) Name do not return visible objects actually.  Those
just return data.
I don't know "_add" suffix is correct for none visible objects.
I cannot decide yet whether those should be removed from map widget.
But current trends are that route, geocoding are  tightly coupled with
Map.

If Apps want to use only data, just use elm_map_route_add().
If not, use elm_map_route_add() & elm_map_overlay_route_add().
Also name overlay could be added in the future.

8) Miscellaneous
elm_map_tile_load_status_get

9) Signals
Basic events : "clicked", "clicked,double", "press", "longpressed",
Scroller events: "scroll", "scroll,xxx,xxx"
Zoom events: "zoom,start/stop/change"
Source (provider) events: "tile,load/loaded/loaded,fail" ,
"route,load/loaded/loaded,fail", "name,load/loaded/loaded,fail"

There are some big patches. I think diff program do not make exact
diff. :D.
Anyway, it's  better to maintain if this can be in before API fix
(elementary 1.0).
Because after these change, It is hard to maintain old APIs.

PS) Documentations and some minor bugs are remained yet.



SVN revision: 68915
2012-03-07 09:28:08 +00:00
Carsten Haitzler 37ecd97950 warn--
SVN revision: 68890
2012-03-07 08:08:48 +00:00
WooHyun Jung 6009652735 [elementary] change API name from _scale_set to _resizable_set in
elm_image + elm_icon.


SVN revision: 68719
2012-03-05 13:36:01 +00:00
Bluezery 4de5c80ede From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Add overlay in the map

I made a overlay APIs in the map. This will replace the marker APIs.
I hope that markers will be deleted before elementary 1.0 release.
This was discussed before in
http://marc.info/?l=enlightenment-devel&m=132685497711772&w=2

Marker only supports layout style overlay. So only icon and image are
suitable for marker.  For now on, overlay can support any evas object
and also layout style.
Currently overlay support default, bubble, and class types.  And more
types will be added (Polyline, Polygon, scale, POI etc.).
I made a Elm_Map_Overlay opaque structure for handling general overlay
properties (hide, pause, show, etc.) and coordinates or internal
content (icon, content, etc.) for those different types.
Class type overlay is something like mixture of previous marker group
and marker class.
If member overlays in the same class are closed, they will be grouped.
(Same functionality as previous maker group.) The group's properties
and contents are defined by using general overlay functions.  (New
functionality)
This defined properties and contents can be be propagated to member
overlays appended to this class.  (Same functionality as previous
maker class.)

There are some missing functionalities remained. Group callbacks are
not supported yet in the overlays.
So images inside group bubble can not be shown. I will implement this
feature.

After this patch, I will fix signals and function names before
elementary 1.0 releases.




SVN revision: 68672
2012-03-05 04:18:33 +00:00
Sanjeev BA 4b20052170 Fix up elm_route have min_max API consistent with the rest of elm.
Signed-off-by: Sanjeev BA <eflelev8@gmail.com>

SVN revision: 68379
2012-02-24 05:48:27 +00:00
WooHyun Jung 5ac0eac84d elementar/elm_map : Patch from Bluezery.
===============================
Previsouly i have tested rotation with old version of gesture layer in
touch devices.
Recent gesture layer gives somewhat different event information. So I
fixed it accordingly.
I tested this patch in touch-enabled device.


SVN revision: 68263
2012-02-22 11:40:09 +00:00
WooHyun Jung 6f3a1c3b3f elementary/elm_map : Include some signals to the signal group.
SVN revision: 68262
2012-02-22 11:22:18 +00:00
Daniel Juyung Seo ddec0677d0 elm elm_map.c: Fixed build break when emap is installed. Patch by
Taehwan Kim <ohpowel@gmail.com>

On Tue, Feb 21, 2012 at 8:02 PM, Bluezery <ohpowel@gmail.com> wrote:
> Hello,
>
> Previous my giant patches made build errors when EMAP is enabled. This
> patch fixed this.
> 'ox'  & 'oy' is almost useless values (-1 or 0 value).  I will fix and
> upgrade all things related EMAP later.
> Please review this patch

SVN revision: 68214
2012-02-21 11:19:09 +00:00
Bluezery acf31ec4cd From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Refactoring Elementary Map

I have done refactoring & code clean-up in elm_map.  Event if this
patch have much changes, refactoring & code clean-up jobs almost
always do.
Anyway, code is shortened and optimized I think.
 I have done following jobs in my patch.
 
 (1) Always change child size
 Scroller Child size is changed when integer zoom level is changed
 before. This makes bugs which mouse pointer is not correct on the map
 when map is dragging.
 Now, scroller child size is always changed when double zoom level is
changed.

(2) Evas map
Evas map is used for rotation & zooming before. But now it is used for
only rotation. evas_object_resize() can do zooming because (1) makes
child size always changed.

(3) Grid & Marker & Route, etc.
Because of (1), all coordinate calculations are all changed. So grid &
marker & route should be changed.
When I have fixed these, I have these split into small function
(create, free, update, place, etc.)
So these can be easily reused for other purpose ( I will add overlay
later.)
Also marker size is not changed and is not rotated anymore because
marker's coordinate is just rotated and evas_map is not used for
marker.

And grouping algorithm is somewhat changed. Each marker can be group
leader and if other markers (followers) are closed to leader, markers
are grouped.

Actually _marker_place() function do almost everything. (place marker,
bubble, group & make group, etc.)

Bubbles go along with parent object. (show, hide, move) and this is
created when marker & group are opened.
At now, bubble display bugs are all fixed.

As before, grid is created when elm_map_add() or tile source is
changed. And I add _grid_item_* functions for each 256x256 tile
management.  So grid_place() function can be simple now.

(4) Download idler
Before download is not a job or idler and is integrated with grid
calculation.
I have separated this into independent idler. So now, download idler
do download jobs when idler time.

(5) Zoom
I have made one zoom_do() function.  This does all zoom jobs. At now,
pinch_zoom & wheel_zoom & animated zoom do not much jobs. just call
zoom_do().

(6) Delayed jobs
As I know, evas is based on a retained mode and calculation can be do
later. So sometimes elm_map APIs can not  do the jobs correctly.
For example, elm_map_marker_list_show() or elm_map_zoom_set() can not
be used right after elm_map_add()  because window size and pan size
can be 0.   (refer map_example_02.c)
So when APIs related such calculation are called. These are deferred
and calculated later when _pan_calculate() is called.

5) Code clean-up
I have removed unused variables & functions.  and rearranged struct &
functions & declaration & static variables, etc.
Instead of "if (!wd) return; ", I changed this by macro,
"EINA_SAFETY_ON_NULL_RETURN(wd);". This is better for function
entrance check. Also ELM_NEW is used instead of calloc or malloc.

Aboves are all related each other. So it can be hard to split this
file. If these should be splitted, I'm going to freak ;D.
This patch does no harm!!!! :D.
 After this patch, I will add overlay APIs based on this patch.  I
 doubt whether I will add this before elementary 1.0 release.  :(
 


SVN revision: 68207
2012-02-21 08:01:22 +00:00
Carsten Haitzler 6636c616bf aah we'll take bluz' patch then instead of my fixing
SVN revision: 68206
2012-02-21 07:59:19 +00:00
Carsten Haitzler cbcdc8f8da fix some naming in elm_map as i suggested before.
SVN revision: 68195
2012-02-21 03:40:52 +00:00
Carsten Haitzler 4d730745f7 aaand other part of bluez map commit. easier to fix formatting in svn.
SVN revision: 68194
2012-02-21 03:26:00 +00:00
Bluezery 80a3a87fa9 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Fix zoom & rotated coordinates bug

In my point of view, elm_map did not consider zooming & rotation by
using Evas_Map initially.
There are no problems if you use only elm_map_zoom_set(). But if you
use pinch gesture or wheel to do subtle zooming & rotating, the
calculations of coordinates are not correct currently.

I have fixed these problem and also made some utility APIs for user
convenience.
I made following 3 APIs.
1. elm_map_utils_size_get()
Currently users can only get integer zoom level by using
elm_map_zoom_get().
So if user want to calculate full map size, user should calculate
pow(2.0, zoom level) * tile size.  Furthermore, user assumes tile size
as 256. (tile size can be changed!!)
Also it's not correct sometimes because Evas_map is used for subtle
zooming between zoom levels.
Above APIs return correct full map size.

2. elm_map_utils_region_get()
It can used for getting left top coordinates, center coordinates and
width, height of currently shown map area.

3. elm_map_utils_convert_canvas_into_geo()
Currently it is hard to converting x, y coordinates to geographical
longitude, latitude because of subtle zooming & rotating.
If use wants to get it, user uses combination of above functions and
more. It is harsh job.
This function is used for getting longitude, latitude from x, y
coordinates of current viewport.



SVN revision: 67286
2012-01-18 03:55:40 +00:00
Hyoyoung Chang 7e32a93988 From: Hyoyoung Chang <hyoyoung@gmail.com>
Subject: [E-devel] [patch] elm_map - bugfix small errors
Date: Mon, 9 Jan 2012 20:00:02 +0900

Dear all

After run map menu in elementary_test, i found some minor errors
1. some passing data ptr is wrong at obj_rotate_zoom
2. clipped part isn't set by rect

thanks


SVN revision: 67190
2012-01-13 23:45:53 +00:00
Daniel Juyung Seo 34fd5bbeeb elm map: Fixed formatting. What's up map! Here is your formatting fix!
SVN revision: 67011
2012-01-10 06:43:57 +00:00
Bluezery b291d3c5be From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Smooth stepping of wheel & pinch
gesture

When elm_map doing zooming by using wheel gesture, scroller is resized
if it exceeds certain limit.
But current limit value is 2.0 & 1.0, actually those should be below
2.0 and above 1.0.
The reason is that resizing means exactly 2.0 or 1.0. So if it is
above 1.99x,  it can be 2.0 and can be resized.
In addition, pinch.level & pinch.diff values should not be 1.0 or 2.0
for more accuracy. It should be half of previous pinch level or two
times of that.



SVN revision: 66658
2011-12-30 02:57:17 +00:00
Bluezery 5f6adf21b6 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Pause progressbar animator when
map is paused


When map is paused by using elm_map_paused_set(), all existing
animations is stopped.
(ref:
http://docs.enlightenment.org/auto/elementary/group__Map.html#ga6ab43ef6429140f8cccbd3669c5ed52e)
But progress bar can be still running before all download requests are
completed. It is equal to user expectations.

I have fixed this.
if paused is TRUE, stop progress bar.
If paused is FALSE, start progress bar if download requests are
remained.



SVN revision: 66585
2011-12-28 04:18:59 +00:00
ChunEon Park 90d1d1635e elementary/map - a trivial change.
SVN revision: 66560
2011-12-27 05:43:04 +00:00
Bluezery 4658b25be4 elementary/map
Dear all,

I have found a bug that calculation fails when view port size is
bigger than map size.
For example, if map size is 256x256 but view port size is 798x798
(when zoom level is a 1), center longitude & latitude is out bound
from normal longitude & latitude.
I have fixed it.
Please review this patch.

Signed-Off-By: Bluezery <ohpowel@gmaill.com>
Signed-Off-By: ChunEon Park <hermet@hermet.pe.kr>



SVN revision: 66526
2011-12-26 11:03:18 +00:00
Bluezery 6e25241d32 From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Fix mouse down event propagation

It's simple bug fix for propagate mouse down event via long press
event properly.



SVN revision: 66503
2011-12-26 03:50:33 +00:00
Bluezery e4936563be From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel]  [Patch][elm_map] Mouse wheel bug fix

There is mouse wheel bug. Actually I have made it in previous patch :p

When using mouse wheel, tile size was changed between 0.5 ~ 2.0 before
zoom level is changed. But actually it should be changed between
1.0 ~ 2.0. I have fixed it. If tile size is below 1.0,  it does zoom-out.
And if tile size is above 2.0, it does zoom-in.



SVN revision: 66459
2011-12-22 07:54:59 +00:00
Bluezery 4a5b33941c From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][elm_map] Apply elm gesture


elm_map implement pinch gesture by using evas mouse event. But it made
codes too complicated and dirty.
So I have changed pinch gesture by using elm_gesture. wheel zooming is
also improved somewhat.
From now on, configuration change related elm_gesture easily applied
to elm_map and we can see more smooth zooming :D

Anyway, els_scroller have bugs when the scrolling event & the resize
event occurs at the same time.
So, some dirty codes are added for preventing jumping to strange positions.
Later it will be removed when the bugs are fixed.



SVN revision: 66413
2011-12-21 06:12:08 +00:00
Bluezery 1e5c64bba1 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

(3) Simplify grid_load()
There exists 3 state for grid items. i.e., downloaded, downloading,
none states.
grid_load() does followings:
1. if a grid item does not exist, create it.
2. update a tile (if downloaded) or queues for download (if none) or
nothing  (if downloading)



SVN revision: 66153
2011-12-13 09:07:00 +00:00
Bluezery 66a391e67f From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

(2) Revoking gi->have
I restore the gi->have values. The removal of this is my mistake.
gi->have is needed because I cannot know whether this file is
downloading (just opened and not written) or downloaded state even if
image file exists.



SVN revision: 66141
2011-12-13 08:39:01 +00:00
Bluezery d328f8b4c7 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

(1) Grid Management
There are no caching mechanism in current elm_map.
So, too many network resources are wasted because elm_map keeps only
two grids and already downloaded images are downloaded again and
again. (This also slows the map loading speed)
I have changed this grid management policy.

I have done followings.
1. Create all grids (all zoom levels) when elm_map_add() is called (No
memory overhead because of sparse matrix)
2. Clear all grids when map object is deleted.
3. Loads necessary grids and unloads unused grids when zoom level is
changed.

Changed grid management have one weakness that memory and tmp size can
grow bigger while map object is live.
I think it may need API such as elm_map_cache_size_set().



SVN revision: 66140
2011-12-13 08:31:55 +00:00
Bluezery 4231f82a56 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Change grid management

Grid Management
There are no caching mechanism in current elm_map.
So, too many network resources are wasted because elm_map keeps only
two grids and already downloaded images are downloaded again and
again. (This also slows the map loading speed)
I have changed this grid management policy.

I have done followings.
1. Create all grids (all zoom levels) when elm_map_add() is called (No
memory overhead because of sparse matrix)
2. Clear all grids when map object is deleted.
3. Loads necessary grids and unloads unused grids when zoom level is
changed.

Changed grid management have one weakness that memory and tmp size can
grow bigger while map object is live.
I think it may need API such as elm_map_cache_size_set().



SVN revision: 66131
2011-12-13 03:48:18 +00:00
ChunEon Park 2a3bb21c44 elementary/map
Sorry, I have forgotten adding comments to my patch.
OSM recommends to requesting map images distributively.
Please refere http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames

I used 3 input parameters for selecting one from a, b, c or 1, 2, 3, 4
tile servers.
I attached patch with comments.

Signed-Off-By: TaeHwan Kim(ohpowel@gmail.com)
Signed-Off-By: ChunEon Park(hermet@hermet.pe.kr)



SVN revision: 65892
2011-12-05 09:00:04 +00:00
Bluezery 944ecff8f1 From: Bluezery <ohpowel@gmail.com>
Subject: Re: [E-devel] [Patch][elm_map] Remove unnecessary flags

There are too may flags in elm_map. Most of them are duplicated and unnecessary.
I have removed "want", "download", "have" variables.

I use gi->job instead of "want" & "download".
I use ecore_file_exists() instead of "have" flags.



SVN revision: 65890
2011-12-05 07:30:31 +00:00
Daniel Juyung Seo 7a50ddb3d5 elm map: Moved zoom_min_get()/zoom_max_get() to source_init() to
simplify code. Patch by Bluezery <ohpowel@gmail.com>


SVN revision: 65730
2011-12-01 03:54:52 +00:00
Daniel Juyung Seo 0bb9c1e212 elm map: Fixed memory leaks in _nominatim_url_cb() function. Patch by
Bluezery <ohpowel@gmail.com>


SVN revision: 65712
2011-11-30 08:37:55 +00:00
Daniel Juyung Seo 7cd22aa075 elm map: Add error handling to see the definite error log because
sometimes evas_object_image_file_set() is failed. Patch by Bluezery
<ohpowel@gmail.com>


SVN revision: 65707
2011-11-30 05:00:56 +00:00