Commit Graph

46613 Commits

Author SHA1 Message Date
Amitesh Singh 56ab435998 elm_nstate: introduce nstate widget and inherit check from it
Test Plan:
elementary_test -to "nstate"

@feature

Reviewers: yashu21985, tasn, Hermet, seoz, smohanty, felipealmeida, JackDanielZ, jypark, woohyun, herdsman, raster, cedric, jpeg

Subscribers: saurabhbunty, seoz

Differential Revision: https://phab.enlightenment.org/D3786
2016-04-07 19:05:57 +09:00
Jean-Philippe Andre d1709a2b57 Efl: Rename flip and orient enums
Efl.Flip is now the enum, the interface is Flipable.
We could even use names like Efl.IFlip a la Java.

eo_prefix is used to have pretty names in C. legacy: null
is removed from the enums. orient_x0 is removed and only
defined in C with #define
2016-04-07 17:32:40 +09:00
Yeshwanth Reddivari 7f9036dce5 Interface: Progress - Add common interface for Slider and Progressbar
Summary:
Implement common interface efl_ui_progress and inherit slider and progressbar from common interface.
Currently legacy APIs will also call interface functions and later it can be deprecated.
This interface will be moved to EFL in src/lib/efl/interfaces when elementary is merged into efl.

Test Plan:
elementary_test -to 'slider'
elementary_test -to 'progressbar'

Reviewers: singh.amitesh, raster, tasn, felipealmeida, woohyun, cedric, jpeg

Subscribers: saurabhbunty, alok25

Differential Revision: https://phab.enlightenment.org/D3759
2016-04-07 16:50:57 +09:00
Jean-Philippe Andre d03b45f030 Eo: Try to fix windows build
For windows, EAPI needs to be redefined as dllexport/dllimport.
Since we marked all EO APIs as weak, we had two different EAPI
macros: EAPI and EWAPI. Unfortunately, EWAPI was never redefined
(only declared inside Eo.h).

See also a1a506e13e.

See T3423. Thanks @vtorri for the report.
2016-04-07 15:51:48 +09:00
Jean-Philippe Andre 7de2f28b45 Eo: Mark class_get() as weak APIs
While eolian-gen was generating EWAPI (weak) class_get()
symbol declarations, they were implemented as EAPI (strong).
Not sure if this mismatch had any significant effect.

This patch tries to address T3423 (windows build).
The mismatch between EAPI and EWAPI might be the problem.
2016-04-07 15:39:56 +09:00
Jean-Philippe Andre 83a591b335 Ecore: Try to fix build for windows
Move efl.h above ecore.h to not mess with EAPI's dllimport
vs. dllexport definition. This addresses T3423.
2016-04-07 15:25:42 +09:00
Jean-Philippe Andre 4e4b42ec03 Efl: Add internal strong symbol to fix build on GCC < 5.3
This fixes a crash in ecore_init, calling a weak function from
libefl that was resolved to NULL.

So, here's a fun thing happening with GCC < 5.3. Since a1a506e13e
all EOAPI and EO class_get() functions are weak symbols. This means
that all APIs inside libefl.so are weak.

As a result, gcc linker with --as-needed skipped linking to libefl
since not a single strong symbol from libefl was required by
libecore. This is actually a bug in gcc linker since we do in fact
use symbols from libefl, just weak ones.

GCC 5.3 seems to be fixed, so people with GCC 5.3+ will not
experience any build/runtime issue. The current patch is
a workaround that bug, by artifically creating a strong symbol
required by ecore.

Other libraries than ecore might also need to call
__efl_internal_init, if they end up not being linked to libefl.
2016-04-07 14:40:10 +09:00
Cedric Bail 7b0d332e01 ecore: attempt to fix windows build by putting header in a more logical place. 2016-04-06 14:34:45 -07:00
Felipe Magno de Almeida dc954d8dba eolian: add Eolian support for Eina Promises
Add a promise object to allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

The usage is like this in a .eo file:

class Foo {
   methods {
      bar {
         params {
            @inout promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Eo* obj, Eina_Promise** promise);

and a Eina_Promise_Owner for the implementation, like this:

void _foo_bar(Eo* obj, Private_Data* pdata, Eina_Promise_Owner* promise);

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:34:15 -07:00
Felipe Magno de Almeida 944e11559c eo: add before and after macro hooks for API generation functions
Add two parameters for macros that generate API functions in Eo so
that the generation can be customized with macros used by Eolian.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:32:04 -07:00
Tom Hacohen c9347b1ca2 Revert "Eo: Fix rare crash after call_resolve"
I'm reverting this because according to jpeg it was possibly fixed in
5284b62e93.
I reverted this patch after his fix and followed his reproduction cases
and it seems that his second patch does indeed fix this issue so this
patch is no longer needed.

This reverts commit 0862b9d083.
2016-04-06 11:18:36 +01:00
Tom Hacohen c6159e042b Eo tests: Also test function calls in reinit test.
Since we cache ops we also need to check function calls work
when we reinit eo, not just class_get functions.

This commit essentially verifies that
5284b62e93 was done correctly.
2016-04-06 11:15:24 +01:00
Carsten Haitzler b67413bc33 efl build - ecore - add efl link as a PUBLIC link as efl headers it in
I added Efl.h to Ecore.h - because we really want to use efl
interfaces ... like everywhere. so add it to the link too.
2016-04-06 18:27:34 +09:00
Jean-Philippe Andre ba9a2c3612 elm_test: Fix warning with clang
Invalid enum type
2016-04-06 16:36:55 +09:00
Jean-Philippe Andre d61e243f0f elm_glview: Fix warning with clang
I'm using the same gcc construct to initiliaze a complex
struct with {} instead of {0}.
2016-04-06 16:35:48 +09:00
Jean-Philippe Andre b476075081 elm_config: Fix typo and warning
A major typo (hard to find with the naked eye) was present in
elm_config's list of text & color classes. See D3487.

I'm pretty sure this feature has not been used at all.
2016-04-06 16:33:16 +09:00
Jean-Philippe Andre cd8fb35951 els_box: Fix warning with clang
warning: comparison of constant 100 with expression of type
         'Evas_Aspect_Control' is always true
         [-Wtautological-constant-out-of-range-compare]
2016-04-06 16:28:33 +09:00
Jean-Philippe Andre 7c05a957cd elm: Fix some warnings with clang
warning: missing field 'desc' initializer
         [-Wmissing-field-initializers]

Solution: use gcc extension to init structs with {}.
This is a bit ugly, but having too many warnings leads to
ignoring them and not noticing valid ones.

The warning is triggered because the first member of Eo_Event
is not a primitive type (it's a struct _Eo_Opaque *).
2016-04-06 16:28:28 +09:00
Jean-Philippe Andre be41b5afb0 elm_web: Fix warning (missing initializer) 2016-04-06 16:28:17 +09:00
Jean-Philippe Andre c19030b301 elm_image: Fix warning (wrong enum type) 2016-04-06 14:24:50 +09:00
Jean-Philippe Andre 5284b62e93 Eo: Fix function cache after eo reinit
The function call resolve cache may be broken after an eo
shutdown + init cycle, leading to calls to invalid functions.
This adds an static uint for each and every single EO API
entry point, as well as an extra if() check.

Now I'm not sure if the previous commit 0862b9d083 is
still necessary.
2016-04-06 14:24:23 +09:00
Jean-Philippe Andre 7eaf7af1d1 Efl vpath: Fix usage of @class function
Calling an @class function with a real object is not safe.
Missing check somewhere? I believe this should have failed safely.
2016-04-06 13:27:09 +09:00
Jean-Philippe Andre 0862b9d083 Eo: Fix rare crash after call_resolve
It seems that calling a @class function with an EO object
(that was not the required Eo_Class) lead to a situation
where func->func was NULL. And that meant a crash after
call_resolve.

The proper fix is to properly call a @class function with a
class object.
2016-04-06 13:27:04 +09:00
Yeshwanth Reddivari 98edbd23a4 Interface: Flip and orientation interface
Summary:
Added flip and orientation interface and used them in evas_image.
Removed efl_image_orientation_set API and used efl_orientation_set and efl_flip_set API.
In implementation part, converted enums back and forth in order to keep current implementation as it is.

Test Plan: src/examples/evas/evas-images5.c

Reviewers: singh.amitesh, raster, tasn, herdsman, woohyun, cedric, felipealmeida, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3844
2016-04-06 10:46:39 +09:00
Jean-Philippe Andre a142f0bd39 elm_layout: Attach object to iterator
This is part of a new API, not a fix

This was missing in 3c40ebb998
2016-04-06 10:44:59 +09:00
Jean-Philippe Andre 26715dad0b elm_box: Minor fixes 2016-04-06 10:44:55 +09:00
Stephen Houston 31114fb650 Elementary: Don't send selected signal to a part with no selected state. Removes warnings. 2016-04-05 20:39:35 -05:00
Mike Blumenkrantz 01156d3469 elm_win: update wayland opaque region during pre-flush...always
@fix
2016-04-05 15:11:31 -04:00
Felipe Magno de Almeida 8c70b9cfd1 eo-cxx: Fix warning on weak symbols with inline functions
Removed the EOAPI which is not necessary as the function is already inlined
2016-04-05 15:42:21 -03:00
Felipe Magno de Almeida f534fb8943 ecore: add tests for promises with ecore_thread_promise_run
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07:00
Felipe Magno de Almeida 887608e146 ecore: add promise for Ecore_Thread
Add ecore_thread_promise_run function that returns a Promise
and runs function in another thread which you can set the
value on a Eina_Promise_Owner.

Eina_Promise* promise;
Ecore_Thread* thread = ecore_thread_promise_run
( &function_heavy, &cancellation_function, private_data,
sizeof(ValueType), &promise);

This calls function_heavy on another thread and returns
the Ecore_Thread and a Eina_Promise as an out-parameter.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07:00
Felipe Magno de Almeida 1d314828f7 eina: add tests for promises 2016-04-05 11:35:12 -07:00
Felipe Magno de Almeida 09eea7bc01 eina: add promise
Add a promise object that will allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

To understand better, let see the coming usage in a .eo file:

class Foo {
   methods {
      bar {
         params {
            @inout promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Eo* obj, Eina_Promise** promise);

and the equivalent declaration for implementation.

However, the API function will instantiate the Promise for the user
and the implementer of the class automatically. So the user of this
function will treat it as a @out parameter, while the developer of the
function will treat it like a @inout parameter.

So, the user will use this function like this:

Eina_Promise* promise; // No need to instantiate
foo_bar(obj, &promise);
eina_promise_then(promise, callback);

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-05 11:35:12 -07:00
Chris Michael aba46af602 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_crtc_panning_area_set function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 11:43:14 -04:00
Chris Michael ca8e13712f ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_display_interface_type_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 10:14:19 -04:00
Chris Michael ef15639e33 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing function
ecore_x_randr_screen_backlight_level_set

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:58:11 -04:00
Chris Michael bb8011a637 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing API function
ecore_x_randr_edid_dpms_off_available_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:46:57 -04:00
Chris Michael a19756be38 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_dpms_standby_available_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:45:20 -04:00
Chris Michael 760fb0326c ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_display_serial_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:43:04 -04:00
Chris Michael 48bfcd106f ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing
ecore_x_randr_edid_display_ascii_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:39:33 -04:00
Chris Michael 25b0dced34 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing API function
ecore_x_randr_edid_dpms_standby_available_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:34:59 -04:00
Chris Michael 4d048e5725 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing function
ecore_x_randr_edid_dpms_available_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:23:22 -04:00
Chris Michael 84149511da ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for missing API function
ecore_x_randr_edid_manufacturer_serial_number_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:20:53 -04:00
Chris Michael 66b8698be2 ecore-xcb: Add implementation for missing Ecore_X API
This patch adds an xcb implementation for ecore_x_randr_edid_model_get
function which was missing from ecore-xcb.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:18:10 -04:00
Chris Michael 6ce9ab87e8 ecore-xcb: Add implementation for missing API function
This patch adds an xcb implementation for
ecore_x_randr_edid_manufacturer_model_get function

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:16:49 -04:00
Chris Michael 7c2e5a0c3e ecore-xcb: Add missing API function
ecore_x_randr_edid_manufacturer_name_get

This patch adds an implementation inside ecore-xcb for missing API
function ecore_x_randr_manufacturer_name_get

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:11:41 -04:00
Chris Michael debc4da837 ecore-xcb: Add missing API function ecore_x_randr_edid_info_has_valid_checksum
This patch adds an implementation for
ecore_x_randr_edid_info_has_valid_checksum which was missing in the
ecore-xcb codebase.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 09:06:06 -04:00
Chris Michael b89d219093 ecore-xcb: Add missing ecore_x_randr_output_crtc_set API function
This patch adds definition of missing API function
ecore_x_randr_output_crtc_set.

NB: This function also has no code in the xlib implementation

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 08:59:24 -04:00
Chris Michael fb3b6ac327 evas-wayland-shm: Update copyright notice
As portions of this code have been derived from existing code in
Weston, we should also be including their copyright/license text to
give credit.

Fixes T3421

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 07:44:19 -04:00
Jean-Philippe Andre 21a7bc8a3c eolian: Fix test cases
So sorry I missed this in my weak API patch! Bad JP didn't run
make check.
2016-04-05 20:44:57 +09:00