Commit Graph

210 Commits

Author SHA1 Message Date
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