Commit Graph

100 Commits

Author SHA1 Message Date
Shilpa Singh 9151befe0d Colorselector: Item Selection/Unselection logic changes and corresponding API additions.
SUMMARY
Item should remain selected once pressed.
When one item is selected other items should be unselected.
No special behavior on long press, item gets selected on mouse up.
APIs added are to get current selected item and to programmatically
control the selection/unselection of an item.

This is patch D515 (had to do by hand).
2014-02-08 13:33:58 +09:00
Shilpa Singh b2d43d4cf4 Colorselector: Palette_items_get API added.
Summary:
Summary:
Issue:Colorselector adds default palette items by reading colors
from config, application do not have any way to get that color list.
Solution: API added to get the palette's item list.
Signed-off by: Shilpa Singh(shilpa.singh@samsung.com)

Test Plan:
Test Plan: Create a list pointer and call palette_items_get API to get
the list of color items. Change the color of any item to confirm
whether the list has been returned correctly.

Eina_List *list = elm_colorselector_palette_items_get(cs);
Eina_List *list2 = eina_list_last(list);
Elm_Object_Item *color_item = eina_list_data_get(list2);
elm_colorselector_palette_item_color_set(color_item, 0, 0, 0, 255);

Reviewers: seoz, Hermet, raster

CC: govi, myoungwoon

Differential Revision: https://phab.enlightenment.org/D503
2014-02-07 23:35:13 +09:00
WooHyun Jung 0a1179dde4 elm_layout now supports focused/unfocused smart callback
by itself for widgets that inherit layout class.
If it uses elm_widget's, smart callback will be called at the
beginning or smart_on_focus function.
2014-02-06 16:18:57 +09:00
Daniel Juyung Seo 5a787bf58a Colorselector: Item_signal_emit_hook added.
Summary:
Issue: If application has to preselect an item, or change item properties by customizing theme
there is no option provided for the same.
Solution: Add item_signal_emit_hook.
Signed-off by: Shilpa Singh <shilpa.singh@samsung.com>

Test Plan:
Send a signal to item and verify UI
Elm_Object_Item *item = elm_colorselector_palette_color_add(cs, 133, 100, 255, 255);
elm_object_item_signal_emit(item, "elm,state,selected", "elm");

Reviewers: seoz, Hermet

Reviewed By: seoz

CC: govi

Differential Revision: https://phab.enlightenment.org/D504
2014-02-04 00:32:05 +09:00
ChunEon Park 39ad0e358e elementary - support language changed callback from a few widgets.
support a language,changed callback if a widget has the text part in default.
2014-01-23 20:07:20 +09:00
ChunEon Park aebdcff513 elementary - use the focused/unfocused string in widget defined.
Now, it will share the strings so that reduce the binary size also user uses it in one way.
2014-01-23 17:27:17 +09:00
Daniel Juyung Seo db5fe2581d elm: Removed unnecessary null check for evas_object_del. 2014-01-22 10:54:52 +09:00
Daniel Juyung Seo 43533a2fb9 elm: Removed unnecessary null check for eina_stringshare_del. 2014-01-22 10:54:45 +09:00
Daniel Juyung Seo a4f3074f9c elm: Removed unnecessary null check for ecore_timer_del,
ecore_animator_del, and ecore_job_del.

As all efl public free apis get null as valid parameter, we do not need
to check null. I also removed some null check for other free apis which
were right next to timer/animator/job del. After this job code got
cleaner.
2014-01-21 23:18:16 +09:00
Yakov Goldberg 3379c124df all widgets: change Eo API for "elm_widget_theme()" to "theme_apply"
There are elm_widget_theme/theme_set/theme_get functions.
    In Eolian these functions will be described as "theme" method and
    "theme" property. There is clash here.
    So add suffix "_apply" to Eo API for "elm_widget_theme".
2014-01-21 11:08:29 +02:00
Jihoon Kim 7d6e81c09f elm: replace 0 or 1 with EINA_FALSE or EINA_TRUE 2014-01-08 08:23:58 +09:00
Daniel Juyung Seo fd5c046dfe elm: Changed __UNUSED__ to EINA_UNUSED. 2014-01-06 23:33:57 +09:00
Daniel Juyung Seo e63dd3110a elm: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 13:03:55 +09:00
Carsten Haitzler bffa4d013d colorsel - allow widget to re-wrap smaller of resized down with palette on 2013-12-17 09:13:54 +09:00
Daniel Juyung Seo 6d71a23c3a elm lib: removed all the unnecessary empty lines.
being pedantic.
2013-12-15 06:18:35 +09:00
Daniel Juyung Seo 8a0159df4f elm: long waited seasonal trailing whitespaces removal!
This is a ceremony of elementary 1.8 release!
2013-12-02 19:43:46 +09:00
Daniel Juyung Seo 5567837cf5 button,check,colorselector,diskselector,flipselector,image,radio,toolbar: fixed formatting of smart_event functions before working on it.
Now they look more consistent.
2013-11-13 09:54:37 +09:00
Carsten Haitzler 475e48bc7c colorsel - dont free up palette CONFIG except when clearing palette. 2013-11-08 15:42:31 +09:00
Tom Hacohen 2f1e1554e5 Changed Eo class names to be consistent.
All the class names are now of the format: Elm_Type_Subtype_Extra
2013-11-07 11:44:22 +00:00
Daniel Juyung Seo d22076681b elm: Fixed formatting about smart_event check for code consistency.
- Made it look clearer.
- Removed unnecessary local variables.
- Keep the code sequence consistent.
2013-10-28 23:30:12 +09:00
Daniel Juyung Seo 2ccb8399e0 elm_colorselector.c: adopted ELM_WIDGET_DATA_GET_OR_RETURN macro. 2013-10-05 17:13:53 +09:00
Daniel Juyung Seo e756f97dae elm: Longwaited trailing white space removal. Clean elm up! 2013-09-30 22:15:01 +09:00
Cedric Bail 29af5e1e43 elementary: update to new eo_parent_get/set API. 2013-09-25 13:34:27 +09:00
Ryuan Choi 5b32bf60cc colorselector: minor refactoring. remove unnecessary local variable 2013-09-04 10:19:48 +09:00
Rafael Antognolli ddb7b54d79 elm/colorselector: Fix last compatibility problems on the theme.
Also remove a wrong call to set content on "selector", right after it
being set already.
2013-08-27 19:06:14 -03:00
ChunEon Park fe0f0a445e elementary/widgets - set parents before widget constructs their body.
This avoids unnecessary setups again when obj <-> sub has connected.
2013-08-27 00:29:45 +09:00
Carsten Haitzler af59342da3 fix namespace probs with colorsel - support backwards compat. 2013-08-01 21:06:22 +09:00
Carsten Haitzler b2ee9057a0 make colorselector set colors correctly (premul argb) and not mess entries 2013-08-01 20:53:50 +09:00
Carsten Haitzler 59e8bc5a35 Fix elm to use key not keyname (so xmodmap works) 2013-07-31 15:16:41 +09:00
Shinwoo Kim c47ef1b7fe [access] use proper name _elm_access_info_get(); not _elm_access_object_get(); to get access information 2013-07-31 12:57:49 +09:00
Daniel Juyung Seo b45be2b9b7 elm_colorselector.c: removed dead default in switch code which was spotted by coverity. CID 1040039. 2013-07-06 12:10:16 +09:00
Ryuan Choi 54663d2970 colorselector: Remove srgb and lrgb from Elm_Colorselector_Smart_Data
They are always calculated before used so they can be removed from smart data.
2013-06-11 18:57:37 +09:00
Ryuan Choi 215e935ea1 colorselector: Do not send "changed" signal twice when pressed color bar
Regardless of color selector mode, mouse down captured color.
This patch moves callbacks related to picker mode to _start_grab_pick_cb.
2013-06-11 12:22:08 +09:00
Ryuan Choi 15883b69ce elm_colorselector: Refactored not to change RGBA values many times.
For example, colors_set changed RGBA five times (The first is in colors_set itself,
the others are in _hsl_to_rgb which called by _rectangle_redraw).

First, this patch splits _rectangle_redraw to 3 separate functions,
_update_colorbars, _update_hsla_from_colorbar and _update_ergb.
So only proper functions will be called instead of _rectangle_redraw.

Second, SIG_CHANGED will be called when RGBA was only changed.
2013-06-10 16:38:35 +09:00
Daniel Juyung Seo f1b685897d elm: do not declare SIG_FUCSED/SIG_UNFOCUSED if the const char is not used more than once.
ctxpopup, fileselector_button, naviframe, player, popup, bubble, button, calendar, check, clock, colorselector, datetime, diskselector, flipselector, gengrid.
2013-06-10 14:13:55 +09:00
Daniel Juyung Seo 8cf2c8a422 calendar, check, clock, colorselector, datetime, diskselector, flipselector, gengrid: added "focused" and "unfocused" documentations. 2013-06-09 18:55:42 +09:00
Ryuan Choi 287f3cee1c elm_colorselector: Update color bar when color was picked by color picker. 2013-06-05 09:11:16 +09:00
Daniel Juyung Seo 1045cab8a7 elm_colorselector.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 20:47:36 +09:00
Ryuan Choi cbe6ae16b0 elm_colorselector: Can't receive "changed" signal when clicked color palette.
As document mentioned, "changed" should be emitted when the color value is changed.
So, this patch emits "changed" signal when color value is really changed.
In addition, fixed some formatting issue of test_colorselector.
2013-05-23 18:47:07 +09:00
Daniel Juyung Seo b28104166a elm_colorselector.c: fixed my mistake :( 2013-05-23 17:27:09 +09:00
Daniel Juyung Seo a6376e31b1 elm_colorselector.c: Set the colorselector color first before calling "color,item,selected" callback.
Special thanks to Ryuan Choi. This was detected while reviewing his patch.
2013-05-23 17:24:13 +09:00
Daniel Juyung Seo ac25946a19 elm: introduce ELM_FREE_FUNC for code quality enhancement.
There are pros and cons but this
1. reduces human mistakes.
2. enhances readability.
3. enhances code quality.
4. removes future bug.
5. was adopted from enlightenment.

This is not all. I will work on enhancing elementary more and more.
2013-05-22 02:24:02 +09:00
Chris Michael 76eb5c8a1b Add missing HAVE_ELEMENTARY_X guards.
NB: Fixes ticket T107: Building elementary with only wayland support.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-13 12:20:13 +01: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
Yossi Kantor 2b47d9ecd6 Colorselector - selection in palette with up and down arrows is now possible 2013-04-22 11:51:46 +03:00
Daniel Juyung Seo 4ef1ba5088 elm_colorselector.c: fix _item_sizing_eval in a better way.
In the previous way, edje_object_size_min_restricted_calc will never be called because VIEW(item) is an elm_layout.
2013-04-12 03:21:04 +09:00
Daniel Juyung Seo a18a5fa800 elm_colorselector.c: fixed formatting. 2013-04-12 03:19:30 +09:00
Daniel Zaoui 1f62ff7647 Elementary: check object class
We need to check that the object is an edje object before calling the
edje function.
2013-04-09 21:29:24 +03: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