Commit Graph

1217 Commits

Author SHA1 Message Date
Mike Blumenkrantz 93ec34eda9 examples/evas: do not attempt to free animator on window delete
Summary:
animators are implicitly destroyed for this case, and attempting to
manually destroy them just results in an error/failure and invalid reads
since this is a poorly designed api which can internally destroy itself

fix T7000
@fix

Reviewers: Hermet, devilhorns

Subscribers: segfaultxavi, cedric

Tags: #efl

Maniphest Tasks: T7000

Differential Revision: https://phab.enlightenment.org/D6488
2018-07-18 15:31:00 +09:00
Carsten Haitzler 5e58e58d60 efl selection manager + elm dnd test fix with bad string handling
so there are 2 problems behind T7113. first is a problem in the efl
selection manager being "sloppy" with selection data. it's doing a
strlen on the data but it's not a normal c string. it's a blob of
binary data + length value. this fixes that "sloppiness" by using the
len field.

there is also another bug in the dnd test code that again has to do
with "sloppy" handling of data buffers and assuming nul byte
termination and not using the len field properly.

this fixes T7113.
2018-07-16 16:31:53 +09:00
Mike Blumenkrantz 5849debc97 build: fix distcheck when elua is disabled in main tree
Summary:
elua example files were not being distributed correctly as a result of
improper use of build conditionals

Depends on D6582

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: #committers, cedric

Tags: #efl_build

Differential Revision: https://phab.enlightenment.org/D6583
2018-07-13 15:41:15 -04:00
Mike Blumenkrantz 83a0e7440c build: fix distcheck building when main tree is not compiled
Summary:
when running 'make distcheck' immediately after configure, the build
will fail because some example files were incorrectly being distributed
instead of being compiled normally in the dist build

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6582
2018-07-13 15:41:11 -04:00
Alastair Poole d1cbd161bd Patch for T6342
Summary: Deprecate SSLv3.

Reviewers: zmike, raster, devilhorns

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6334
2018-06-20 14:17:25 +01:00
Alastair Poole e680ff7426 examples: fix build on FreeBSD.
Missing header for AF_INET/6. Another small
difference between BSD and Linux et al.
2018-06-14 14:24:04 +01:00
Hermet Park b1d2f2c49a evas example: removed unnecessary calls for vg shapes. 2018-06-14 20:30:28 +09:00
Larry Lira 03e0310a82 examples: fix efl_model parent loop add 2018-06-07 19:15:50 -03:00
Hermet Park bab45b8537 evas gl: update example code for better user understanding. 2018-05-29 11:27:15 +09:00
Lauro Moura 02f77eb092 cxx: Fix examples after part changes
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-24 16:02:19 -07:00
Lauro Moura 969efc6399 examples: Elm: Add dependency on efl.la due to efl_part
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-24 16:02:19 -07:00
Lauro Moura f510d536a4 efl_mono: Fixes after efl_part/del changes.
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-24 16:02:19 -07:00
Cedric BAIL ccb5642eb9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad0.

Most of this change where wrong as they didn't affect the destruction
of the object. efl_add_ref allow for manual handling of the lifecycle
of the object and make sure it is still alive during destructor. efl_add
will not allow you to access an object after invalidate also efl.parent.get
will always return NULL once the object is invalidated.

Differential Revision: https://phab.enlightenment.org/D6062
2018-05-24 16:02:17 -07:00
Jaehyun Cho bce7e7d0d7 examples: Fix slider cxx example based on Efl.Ui.Slider
Unlike Elm_Slider, Efl.Ui.Slider does not support text_set,
format_cb_set, and format_string_set.
To support Efl.Ui.Slider, slider cxx example is modified.
2018-05-15 20:03:20 +09:00
Lauro Moura fe7106d460 efl_mono: Update tests and examples after rename
Summary:
Separated from the generator and libs for easier review
Depends on D6050

Reviewers: felipealmeida, vitor.sousa

Reviewed By: vitor.sousa

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6051
2018-05-03 18:04:41 -03:00
Cedric BAIL 1128dd8e7b elementary: quick fix for filemvc example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 2afe201fff eldbus: update dbus efl.model example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 90df5c2bc9 ecore_con: update efl_net_ip_address_example after migration to new Eina_Future. 2018-05-01 10:39:01 -07:00
Cedric BAIL 6645743f79 eio: update efl_io_manager_ls example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 33fd77e9e4 ecore: move close_on_destructor to close_on_invalidate as that describe the behavior best.
Fix all use to correctly behave on invalidate.
2018-05-01 10:39:01 -07:00
Cedric BAIL ff0f0109d5 eio: fix example to use the new EINA_VALUE_ARRAY_FOREACH. 2018-05-01 10:39:01 -07:00
SangHyeon Lee ae2610bedc efl.ui.view_list : update example text/content name on legacy to efl
update examples and edc as our new naming rule changes.
2018-04-30 19:25:06 +09:00
SangHyeon Lee 75f21087f5 efl_ui_list : introduce new list widget for simple usage
Summary:
most usage of simple list, items are very limited and loading performance is not serious.
to support those requirement, this efl.ui.list will create scrollable box with efl.pack.

user can create list by packing an pre-loaded item object, Efl.Ui.List.Item class.

Test Plan: tested in efl_ui_list_example_1.c in examples.

Reviewers: cedric, felipealmeida

Subscribers: woohyun, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5861
2018-04-28 13:41:41 +09:00
Lauro Moura edf05278ed efl_mono: Names fixes after the big rename
Summary: Depends on D5997

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5998
2018-04-26 10:55:18 -03:00
Lauro Moura 628e5ab950 efl_mono: Use PascalCase in events
Summary:
To deal with events with the same name as some methods (Del, Invalidate,
etc), the suffix Evt was added.

Thus, now we use

obj.ButtonClickedEvt += callback;

Instead of

obj.BUTTON_CLICKED += cal

The argument classes use the same scheme, being called <Evt name>_Args.
Depends on D5991

Reviewers: felipealmeida

Reviewed By: felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5992
2018-04-26 10:55:18 -03:00
Xavi Artigas 6a98b84cd7 Efl.Ui.Layout.Object (from Efl.Ui.Layout)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:54 -07:00
Xavi Artigas df75462a64 Efl.Net.Control.Manager (from Efl.Net.Control)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:42 -07:00
Xavi Artigas 5697f6e94b Efl.Gfx.Image* (From Efl.Image*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:40 -07:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Xavi Artigas 6be604e965 Update elementary examples .gitignore
Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:26 -07:00
Xavi Artigas 65ee277a66 Efl.Canvas.Scene (from Efl.Canvas)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:23 -07:00
Lauro Moura 1179058017 efl_mono: Fix after prop get const change 2018-04-19 14:06:02 -03:00
Stefan Schmidt 72f4ab875d examples: cxx: fix some missing const attributes in colourable*
Fixing some fallout from fcae7cab27

Given that the examples do not build for weeks with CXX enabled this is
just the tip of the iceberg.
2018-04-18 10:15:26 +02:00
Lauro Moura 4214311a76 examples: Improve efl_mono and eolian_cxx build
The examples were either not build or using repeated rules due to
_EOLIAN_DEP_GEN not being set correctly was Makefile_Eolian_Helper.am
assumes it being inclueded from src/, while each example folder has its
own .am inside its folder.
2018-04-12 21:23:42 -03:00
Xavi Artigas 2a512b72f0 elementary: fix efl_ui_view_list examples
Reviewers: SanghyeonLee

Reviewed By: SanghyeonLee

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5863

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-04-05 10:00:02 -07:00
Stefan Schmidt 568fc2ab30 tests: elementary: fix build break after rename of efl_ui_view examples
Commit ae8df9ba07 renamed the files but
did not rename the references in the Makefile.
2018-04-05 14:37:47 +02:00
Cedric Bail 6fa9dc37fe evas: parent need to exist to create a vg object. 2018-04-04 16:31:09 -07:00
SangHyeon Lee ae8df9ba07 efl_ui_view_list : change the name of Model based list
Summary:
model based list need to be under the namespace of 'Efl.Ui.View".
thus, I renamed 'Efl.Ui.List' to 'Efl.Ui.View.List' properly.

Test Plan: N/A

Reviewers: cedric, felipealmeida

Differential Revision: https://phab.enlightenment.org/D5855
2018-04-04 19:13:41 +09:00
Cedric BAIL c88780b398 evas: for whatever reason the example didn't interpolate the origin before. 2018-04-03 14:26:59 -07:00
Cedric BAIL 4748cd7da2 evas: update example to always set a parent for VG node. 2018-04-03 14:26:59 -07:00
Lauro Moura bffe42e71b csharp: Support argument marshalling in func ptrs
Function pointers now go through the same argument marshalling pipeline
as normal functions.

This will enable interfaces like Efl.Ui.Format to work properly.
2018-04-03 17:29:41 -03:00
Felipe Magno de Almeida be06c27762 efl-mono: Fix compile flags, .config files and class_name in description 2018-04-03 14:01:29 -03:00
Carsten Haitzler 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Lauro Moura c83bcb059b csharp: update examples
Summary:
They were still using the old SetSize(w, h) API instead of receiving
eina.Size2D structs.

Test Plan: Build examples and run them.

Reviewers: felipealmeida, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5830

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-03-08 15:46:45 -08:00
Amitesh Singh 558947bf81 examples: cxx: fix the compilation for slider example. 2018-03-07 19:25:19 +09:00
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Mike Blumenkrantz 27c83a19e4 evas3d: update examples to constructor change 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 6b9a35d763 Efl.Ui.Model.Factory.Connect: remove this entirely
merge 'connect' method into Efl.Ui.Factory class as 'model_connect'
2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 30e52e9413 ecore_audio: remove "name" property 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz ac909ac04c efl-net: rename conflicting "name" properties 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz fcfd832ce5 eldbus: rename custom constructor methods
"constructor" conflicts with the base efl object constructor

some of the params for these should maybe be refactored into properties
and use finalize?
2018-02-15 13:11:00 -05:00
Larry Jr ee0cbdad17 elementary: efl_ui_list change SegArray tree to Efl.Object 2018-02-15 15:08:54 -02:00
Larry Jr 7e0f98a794 elementary: efl_ui_list focus manager fix
fixed focus changed with keyboard
fixed scroll in focus
fixed focus in example
2018-02-15 15:08:54 -02:00
Lauro Moura 1d48a5b0c8 efl: general distcheck fixes
Summary:
- Added missing C++ header
- Added missing elementary header
- Removed generated header from elementary_SOURCES
  (Was added by raster in 42dfee37)
  Not sure of what would be the best place for it, though.
- Removed previously removed files from elementary examples Makefile.

Test Plan: Run 'make distcheck'

Reviewers: stefan, felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5800

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-02-14 12:47:40 -08:00
Mike Blumenkrantz 27ae060633 evas3d: use a type setter function with finalize instead of a custom constructor
resolves a conflict with the 'constructor' method name
2018-02-12 16:47:41 -05:00
Lauro Moura 9a4b8f3800 efl_mono: Distcheck fixes
- Export required sources
- Avoid generated sources being passed as static ones
2018-02-08 10:50:04 -03:00
Lauro Moura 72d92a71ce examples: Remove duplicated build code for mono examples. 2018-01-25 15:56:08 -03:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Jean-Philippe Andre 71ee800521 efl: Merge Flipable and Orientation
No need to split: those two are used in all the same classes, since the
split between Orientation and Ui.Dir.

Note that the enum types remain in the main namespace.
2018-01-18 17:29:28 +09:00
Amitesh Singh 7d68a89ef3 examples: evas vg: fix the compilation of vg batman 2018-01-18 15:19:53 +09:00
Vincent Torri 910f318ad9 examples: Simplify & fix thread example
This fixes the example for Windows, where apparently it ran into a lot
of errors with spinlock. Note that on Linux we have such errors too
(both before and after the patch):
EINA ERROR: 'Invalid argument' on lock 0x7ffd218af410
EINA ERROR: 'Invalid argument' on unlock 0x7ffd218af410

Patch by @vtorri
2018-01-17 17:37:03 +09:00
Jean-Philippe Andre 5555726fef examples: Show off usage of "background" part
See bg_cxx_example_01
2018-01-16 22:04:55 +09:00
Cedric Bail 631eb3701d ecore: forgotten EFL_MAIN_EX. 2018-01-15 14:22:27 -08:00
Stefan Schmidt 8fc21da029 examples: efl_ui_list: remove unused variables 2018-01-15 10:41:58 +01:00
Stefan Schmidt ef71e2550c examples: calendar_cxx: comment out unused variables
I normally would simply remove them, but they belong to some more
commented out code below. We should either remove both or get this
fixed.
2018-01-15 10:40:39 +01:00
Stefan Schmidt 2cc63bb8b2 examples: cxx: avoid tick in warning message
The compiler is not to happy about having this tick in the warning
message. Switch to the more formal can not and be done with it.

menu_cxx_example_01.cc:3:26: warning: missing terminating ' character
2018-01-15 10:38:36 +01:00
Vincent Torri 4916973a60 efl: remove inclusion of dirent.h where it is not used
Test Plan: compilation

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5733

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-01-12 11:06:12 -08:00
Cedric BAIL be3abbd105 ecore: remove use of efl_main_loop_get from efl_net_socket_ssl_server_example. 2018-01-11 11:13:17 -08:00
Cedric BAIL 1f784b8c6c ecore: remove use of efl_main_loop_get from efl_net_socket_ssl_dialer_example. 2018-01-11 11:13:17 -08:00
Cedric BAIL 0e91525d25 ecore: remove use of efl_main_loop_get from efl_net_session_example. 2018-01-11 11:13:17 -08:00
Cedric Bail 3412ad9ca3 ecore: remove use of efl_main_loop_get from ecore_promise2_example. 2018-01-10 18:16:25 -08:00
Cedric Bail c5cd3f1a79 ecore: remove use of efl_main_loop_get from efl_net_server_simple_example. 2018-01-10 18:16:25 -08:00
Cedric Bail 1b10ef1313 ecore: remove use of efl_main_loop_get from efl_net_server_example. 2018-01-10 18:16:25 -08:00
Cedric Bail dacf3293a9 ecore: remove use of efl_main_loop_get from efl_net_dialer_windows_example. 2018-01-10 18:16:25 -08:00
Cedric BAIL dda427dc51 ecore: remove use of efl_main_loop_get from efl_net_dialer_websocket_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL 6667a914ac ecore: remove use of efl_main_loop_get from efl_net_dialer_websocket_autobahntestee. 2018-01-09 16:29:30 -08:00
Cedric BAIL 489671f4e1 ecore: remove use of efl_main_loop_get from efl_net_dialer_unix_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL 76d91121f8 ecore: remove use of efl_main_loop_get from efl_net_dialer_udp_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL 1393df02f1 ecore: remove use of efl_main_loop_get from efl_net_dialer_simple_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL a9fb821559 ecore: forgot to switch to use Efl_Net.h for efl_net_dialer_http_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL bb5f9d156c ecore: remove use of efl_main_loop_get from efl_net_dialer_http_example. 2018-01-08 16:18:52 -08:00
Cedric BAIL 419145a298 ecore: remove use of efl_main_loop_get from efl_net_control_example. 2018-01-08 16:04:22 -08:00
Cedric BAIL a0e81d1276 ecore: remove use of efl_main_loop_get from efl_io_queue_example. 2018-01-08 15:55:17 -08:00
Cedric BAIL e38a5b1234 ecore: remove use of efl_main_loop_get from efl_io_copier_simple_example. 2018-01-08 15:47:18 -08:00
Cedric BAIL dbba64a5f9 ecore: remove more use of main loop reference from unified API example. 2018-01-08 13:19:48 -08:00
Cedric BAIL 8428289c94 ecore: remove use of efl_main_loop_get from example. 2018-01-08 10:08:43 -08:00
Jean-Philippe Andre ade2c9ed52 csharp: Fix an example
Event name changed.
The definition of the type BUTTON_CLICKED_Args seems odd as it's in
efl.ui namespace directly.
2018-01-08 21:24:25 +09:00
Vincent Torri 4c44890872 elm example : on some OS (windows...) struct tm has 9 fields and not 11. Fix warning.
Test Plan: compilation

Reviewers: raster, jpeg

Reviewed By: raster, jpeg

Subscribers: jpeg, cedric, raster

Differential Revision: https://phab.enlightenment.org/D5723
2018-01-08 21:10:22 +09:00
Vincent Torri 6afcd9b2a1 evas: NEAR AND FAR are already defined on Windows 2018-01-04 12:57:33 -08:00
Carsten Haitzler 9bedda14b3 efl loop - rename ecore_main_loop_get to efl_main_loop_get
ecore_main_loop_get() is really a new "eo api" but it's using our old
ecore_* namespace, so move to the new efl namespace.
2018-01-02 16:13:54 +09:00
Felipe Magno de Almeida c3beffb3ca efl-mono: Fix removal of .exe extension in Linux systems 2017-12-20 19:57:17 -02:00
Lauro Moura 46b202b86c eolian-mono: Add documentation generation support
This commit adds the "documentation" generator, which gets the
documentation_def attribute of the given item and generates xml comments
to be exported by MCS.

For items requiring some customization of the generated comments (e.g.
functions and its parameters), the helpers to generate the preamble
(summary), body (paragraphs) and epilogue (currently just the @since
tag) were added.

Currently we do not support converting Eolian references into xmldoc
references.

As we explicitly generate Get/Set methods for properties, for now the
generator tries to get the get/set specific documentation first. If it
is not present, fallback to the common docs.

Later this could be changed to generate the common one as paragraphs of
the Get/Set.

Also some generated code like the wrappers for calling C# methods
from C can be private. This will cleanup the introspection results
and warnings when generating documentation.

Due to this visibility change, the binbuf tests had to be changed
to add redirect calls to the native methods instead of directly
calling the DllImport'd methods.
2017-12-20 19:57:17 -02:00
Lauro Moura 8f14f1610e examples: Add C# buttons/popup example. 2017-12-19 17:51:51 -02:00
Jean-Philippe Andre 43c0122dd6 examples: Fix compilation (cxx bg & table)
See 25136ddf8c
See 0f16a06710

Note: This only fixes compilation, not runtime!
2017-12-19 14:36:54 +09:00
Lauro Moura 54c09d64f6 eolian_cxx: Fix cxx build after evt changes
Summary: Examples and libeolian_cxx api changes

Reviewers: jpeg, felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5673
2017-12-19 14:25:08 +09:00
SangHyeon Lee 0f16a06710 interface : change efl_pack_grid and efl_ui_grid to efl_pack_table and efl_ui_table
Summary:
Change name of 'grid' to 'table' for matching on common ui naming
and avoiding confusion with 'gengrid' and 'grid view'.
grid will be introduced as grid image view after.

Test Plan:
checked make & make install
checked make check - there are errors but not related with these changes.
checked make examples - there are errors in cxx but not related with these changes.
checked make discheck - failed
test in elementary_test with Efl.Ui.Table and Table_static.

Reviewers: raster, cedric, jpeg, felipealmeida

Differential Revision: https://phab.enlightenment.org/D5668
2017-12-19 14:25:08 +09:00
Wonki Kim 47bf356435 scroller: Introducing Efl.Ui.Scroller
Summary:
scrollable widgets had a interface_scrollable as a mixin so that the
widgets had a 'is-a' relation with interface_scrollabe.  however, new
scroller concept don't have 'is-a' relationship, but 'has-a'
relationship.  scrollable widgets should have a scroll manager inside
them, then scroll manager handles event from user and api
implementations.  and also we cut the features such as paging because
there will be aka 'elm_pager'.

we are expecting that the new concept make us to maintain the scroller
easier.  please excuse for many unorganized code and logics. : (

[contained commit]
scrollable: add efl_ui_scroller example
scrollable: refactoring for behavior in case of multiple scroller
scrollable: remove repetitive scrollbar code.
scrollable: combine calculating bounce distance code.
scroll_manager: mouse up function refactoring
scroll_manager: mouse move function refactoring
scroll_manager: warp animator wip
scroll_manager: fix denominator value when calculating flicking behavior.
Fix to disconnect bounce animator once animation is done
gather duplicated animator drop logics
gather duplicated conditions
Rearrange prototypes and append comment
Add manipulate functions for animators
scroll_manager: change member_add function.
scroll_manger: apply mirroring logic
scroll_manager: apply scrollbar
apply API to scroller widget
scroll_manager: apply scroll event callback
Change logics for all about scroll animating
efl_ui_pan: add efl_ui_pan
scrollable:  change content_min_limit to match_content
scroll theme: apply overlapped scrollbar
+ many others!

Reviewers: akanad, woohyun, cedric, jpeg

Subscribers: jenkins, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5222

Note by @jpeg:
Unfortunately this patch comes in a massive single blob, after too many
rebase operations. It has now come to a point where I think the API is
nice and it works as I'd expect.
Now I only wonder how applicable this will be for Efl.Ui.List. As we can
see Photocam (legacy and unified API) could be transformed to use this
new API.
2017-12-19 10:26:25 +09:00
Sungtaek Hong 25136ddf8c efl_ui_bg: add Efl.Ui.Bg interface
Summary:
- Previous class efl_ui_bg moved to efl_ui_bg_widget.
- Scale_type moved to efl_image from efl_ui_image.
- Previous enum Efl_Ui_Image_Scale_Type moved to Efl_Image_Scale_Type.

Test Plan:
Run elementary_test
1.Image Scale Type
2.Efl.Ui.Bg
3.Efl.Ui.Win
4.Part Background

Reviewers: jpeg, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D5616
2017-12-18 20:49:45 +09:00
Vitor Sousa b55542889b efl_mono: fix test and example compilation on Windows 2017-12-15 22:26:30 -02:00
Cedric Bail 2853f9c3b3 ecore_con: update efl_net_control_access_point_connect to use Eina_Future. 2017-12-14 16:42:44 -08:00
Felipe Magno de Almeida 0322ff14a6 eolian-cxx: Fix distributing eo files in examples 2017-12-14 18:19:54 -02:00
Vitor Sousa e8edf882bf efl-mono: Fix examples Makefiles for mono examples 2017-12-14 17:42:42 -02:00
Felipe Magno de Almeida f869065873 efl-cxx: Fixes in automake Makefiles 2017-12-14 17:42:42 -02:00
Amitesh Singh 3726af8313 efl.image.load: fix eolian redefine warnings for load_error{}
load_error{} was defined in efl.file as well.
remove load_error{} from efl.image.load intf and implement
Efl.File.load_error{} instead.

Ref T6514
2017-12-14 14:16:13 +09:00
Ross Vandegrift 71e5c74eb6 efl: drop deprecated Encoding key from desktop files
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 1.20.6.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5584

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Felipe Magno de Almeida e67d6484b8 efl-cxx: Fixes to make dist 2017-12-13 14:13:09 -02:00
Felipe Magno de Almeida fd92dec358 elementary: Add efl_ui_list widget 2017-12-13 14:13:09 -02:00
Lauro Moura 86f2e0f8ce efl_mono: Fix dll.config paths 2017-12-12 22:34:05 -02:00
Cedric BAIL a8197a8c40 ecore_con: use Eina_Future for Efl.Net.Control.Technology. 2017-12-11 15:03:11 -08:00
Felipe Magno de Almeida ff9293827f efl-mono: Fix automake files in C# binding search with buggy mono version 2017-12-11 14:45:57 -02:00
Lauro Moura 33f285c063 examples: Fix after edje_obj canvas_layout change
Summary:
Edje.Object was renamed Efl.Canvas.Layout in

54ae9cc18b

Reviewers: jpeg, marcelhollerbach, felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5610
2017-12-06 18:52:13 -03:00
Jean-Philippe Andre 8cdb3184f8 cxx: Fix compilation after merge
This resolves a few issues and brings back the experimental features.

Also, disable some of the ugliest experiments:
 - manual function overrides,
 - define APIs only in eo_cxx namespace

Some APIs are generated behind EFL_CXXPERIMENT (eg. event_name_cb_add or
some weak pointer stuff). I believe they are useful but would like to
make sure there are no serious drawbacks with generating those.
2017-12-05 15:01:45 +09:00
Jean-Philippe Andre 08918e3285 cxx: Update slider example 2017-12-05 15:01:45 +09:00
Jean-Philippe Andre 5901b4601e cxx: Implement support for parts
This generates methods like this:

  Part_Class part_name() const;

Which can then be used like:

  slider.indicator().format_string_set("%1.1f");
2017-12-05 10:15:40 +09:00
Jean-Philippe Andre e738c5e869 cxx: Fix bg examples
One uses the Bg widget and the other one uses the part.
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 63725d71fd cxx: Implement proper part support (wrt. refs)
It's VERY hacky, but works as expected: no leak, no extra unref. This is
a lucky case of simply overriding efl_part() implementation in C++,
without having to modify the declaration.
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre d887c4de52 cxx: Add implicit conversion to Eo* pointer
This is part of the experimental stuff.

Allows calling C functions without using ._eo_ptr() explicitly. Probably
not super useful, assuming the interfaces are done :)
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 753304c69d cxx: Add define EFL_CXXPERIMENTAL for testing
I'll hide some controversial features behind this, until we come to an
agreement with @felipealmeida and people who actually know C++ (iow: not
just me^^).

Features protected:
 - easy wref (using -> without locking)
 - xxx_event_cb_add() functions in object classes
 - instantiate(obj) to create a new object
 - add as a synonym for instantiate (both in efl::eo)
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 425d8db90f cxx: Showcase function pointer in calendar example
This is just a work-in-progress example.
2017-12-05 10:14:03 +09:00
Jean-Philippe Andre 1997e1b3d0 cxx: Some code style in examples
Use the common form
  Class a(instantiate);
instead of
  auto a = Class(instantiate);

Also modify bg example to not use an policy.
2017-12-05 10:09:58 +09:00
Lauro Moura b97d3438eb efl_mono: Add buildystem integration.
The C# bindings are built using the --enable-csharp-bindings (disabled
by default).
2017-12-04 15:47:51 -03:00
Lauro Moura 41c073b2e6 efl_mono: Add examples code.
Buildsystem support will be enabled in a future commit
2017-12-04 15:47:51 -03:00
Jaehyun Cho 59788cc9d0 examples: Add popup cxx example 2017-11-28 17:15:42 +09:00
Lauro Moura 3ca7d95321 elementary: fix compilation of cxx examples
Summary: Missing ecore_con library

Reviewers: felipealmeida, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5517

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-11-23 15:34:54 -08:00
Jean-Philippe Andre 3a9aa6b93a cxx: Fix slider example (bad downcast) 2017-11-20 20:42:39 +09:00
Jean-Philippe Andre e3e9749795 cxx: Disable spinner example (broken)
A new API for spinner is coming soon. This example code is now broken
since my change on Efl.Content vs. Efl.Container.
2017-11-20 20:31:07 +09:00
Jean-Philippe Andre dda18948ae efl: Split Efl.Container and Efl.Content
When I first implemented the Efl.Container interface I made a mistake of
mixing "single slot" content API's with "multiple children" content
API's.  This should fix that, by separating API's that are for a single
part and those that deal with a list of children.

  Efl.Content: Single slot. This will be used a lot by efl_part()
objects, and for the default content of widgets (eg. the window
content).

  Efl.Container: Multiple children. Used by lists, boxes, layouts
(edje/elm), etc...

I didn't see any class that implemented both interfaces (note: Layout
implements Container and Button implements Content, so technically
Button implements both through inheritance).

For now the eo_prefix is not changed in Efl.Container. I wonder if it
should be reset (to efl_container) or not. This would only affect the C
API.

Ref T5328
2017-11-20 19:02:09 +09:00
Jean-Philippe Andre 313eb563b5 win: Rename specific APIs to avoid clashes
This renames 3 basic APIs specific to Win:
 - name
 - type
 - role

Ref T5322
2017-11-16 19:11:51 +09:00
Daniel Kolesa 2f81b26367 eolian: scan system dir by default
The '-S' option lets you reverse that. But by default, most
people will want the prefix to be scanned for eo files.
2017-11-14 13:47:09 +01:00
Jean-Philippe Andre 0c142462a1 win: Move autodel to C only
Note: this is C only, not legacy only.
The problem is that bindings will hold a strong reference to the window,
which will then die "under the rug" if autodel is enabled. This then
leads to at least ERR if not crashes.

Note:
elm_policy needs to support autodel and quit on last del only for C
applications. Bindings will require some other mechanism that doesn't
break all assumptions wrt. references.
2017-11-14 12:18:39 +09:00
Jean-Philippe Andre 247d25aa99 cxx: Fix example for GCC
clang has no problem, but GCC complains with "support not implemented"
Discovered with distcheck
2017-11-10 12:20:27 +09:00
Jean-Philippe Andre a0dc0eb516 cxx: Fix slider example
The fix is not complete. We need to make efl_part() work nicely in C++:
 - Get the refs work properly (maybe without auto-del)
 - Generate the parts from the EO file as methods on the object

Final form should be close to:
  slider.indicator().format_string_set("%1.2f");

Where everything autocompletes nicely :)
2017-11-07 22:21:13 +09:00
Lauro Moura 7ab444acbc example: Add elocation to elm build
Summary:
9d2dcd92 requires elocation to build.

cxx examples still broken due to elm cleanup

Test Plan: make examples

Reviewers: jpeg, felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5426
2017-11-07 21:49:26 +09:00
Jean-Philippe Andre 778c5afb3f cxx: Fix some examples, disable or remove others
make examples now builds all c++ examples but some of them are in fact
empty skeletons. Those either need some c++ love or the final eo api to
be ready (eg. menu, popup, ...).

I removed some examples that don't have an exact equivalent in EO since
the widget is legacy only.
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre d4c92b39df cxx: Modify button example with wref
This is more of an experiment than anything else.
@felipealmeida I would like to know what you think.

Notes:
 - events still need a better API (event_add isn't part of the object
   definition...).
 - references are an issue, when you want to actually delete an object.
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 0d1a2db617 cxx: Completely rewrite box example
This was showing off box transitions, which don't exist in EO API.
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 9c9278cd45 cxx: Fix a few examples
- Calendar: Some examples can't be ported. Not good.
 - Toolbar: Needs the new API to be completed.
 - Clock: Crashes at runtime.

Ping @felipealmeida
2017-11-07 09:57:24 +09:00
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Amitesh Singh 855959f24d eina example: fix eina_value examples 2017-10-30 16:17:16 +09:00
Amitesh Singh 04fe5e10a2 eina: eina_value - Add "struct tm" support
Ref T6204

@feature
2017-10-30 16:04:53 +09:00
Jean-Philippe Andre c78b4dbd00 cxx: Fix examples compilation 2017-10-27 10:17:14 +09:00
Amitesh Singh f983bfc277 examples: eina strbuf - fix the example 2017-10-24 22:48:01 +09:00
Prince Kumar Dubey 9d2dcd92f7 example: improve location example, fix crash
Summary: Printing Address detail with Position. Label added to show the
detail of address.

Test Plan:
Compiled with cmd:
  gcc -o location_example_01 \
  location_example_01.c -g `pkg-config --cflags --libs elementary \
  elocation`

Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5356
2017-10-24 15:44:16 +09:00
subhransu mohanty d267595557 evas: add set function for root_node property.
Summary:
Currently user ask for the root_node from the evas_vg object and then attach its tree by setting the root node as parent.
With this change this process will be explicit. user has to set the root node to the evas_vg object and the object will take the ownership
of the tree. User can query the current vg_tree by root_node_get api.

Test Plan:
        Fixed the test app to reflects this change.

Reviewers: jpeg, cedric

Reviewed By: jpeg, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5347

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-23 11:05:38 -07:00
Prince Kumar Dubey 2866358a5d example: print format correction to avoid warning.
Reviewers: raster, cedric, jpeg

Subscribers: rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5312
2017-10-17 17:31:38 +09:00
Prince Kumar Dubey 41197981ab efl: unsigned int/long never be less than zero. Fixed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

Differential Revision: https://phab.enlightenment.org/D5300

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:07:28 -07:00
Prince Kumar Dubey 3935607483 eina: uninitialization of array leads to unwanted outcome of "eina_strlcat"
Reviewers: raster, cedric, rajeshps

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5297

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:03:55 -07:00
Amitesh Singh 2cf24eb304 eina: strbuf - Add strftime related functions
eina_strbuf_append_strftime()
eina_strbuf_insert_strftime()
eina_strbuf_prepend_strftime() - macro

We need these functions for implementing generic format function
interface especially for calander.

Ref T6204
2017-10-13 16:04:24 +09:00
Cedric Bail 35a3b3ca4c eio: fix multiple open/close chain example. 2017-10-09 18:27:56 -07:00
Cedric Bail 044acdf1d2 eio: update example for openning and closing file asynchronously using a chain. 2017-10-09 17:44:33 -07:00
Subodh Kumar 3991f40cb9 eina: same expression on both statement.
Summary:
Comparing with same expression is avoided.
@fix

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5268

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-09 16:36:57 -07:00
Cedric BAIL 16b0733a52 build: fix make examples on Windows
Summary: We should define the windows version before including evil.

Test Plan: Run make examples on windows newer than XP.

Reviewers: vtorri

Subscribers: jenkins, cedric, jpeg

Tags: #efl, #windows

Differential Revision: https://phab.enlightenment.org/D5261

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-10-05 16:23:52 -07:00
Cedric BAIL 8f3e860e8e eio: migrate example to use Eina_Future. 2017-10-05 14:21:23 -07:00
Cedric BAIL 91957a4119 evas: remove evas_canvas3d_texture_file_set and efl_file_set instead. 2017-10-05 11:36:23 -07:00
Cedric BAIL 871b6ac0ad ecore_con: simplify Efl.Net.Server.Ssl by inheriting from Efl.Net.Server.Tcp. 2017-09-29 16:01:02 -07:00
Cedric BAIL b7049e8c43 ecore_con: add an intermediate Efl.Net.Server.Ip 2017-09-29 14:12:03 -07:00
Jean-Philippe Andre a742edb486 examples: Fix C++ bg example
This is not nice yet... part API needs to be improved in C++.
2017-09-26 22:00:02 +09:00
Jean-Philippe Andre 112edeeea8 elm: Remove range "span_size" API in EO
Reasons:
 - This API has been confused with the min size of the widget, resulting
   in badly laid out applications.
 - The EO API was not very nice (Range is about numbers, the Gfx size
   hint in a part is really ugly).

While I understand the value of this API and how it can be used in
scalable applications, it is in fact not absolutely necessary.
Alternatively to that span size, the widget min size can already be
defined from the application side, or the widget can simply be expanded
to fill in its parent.

This can obviously be reinstated later if the need arises for EO. For
now, keep this feature as legacy-only.
2017-09-21 12:27:34 +09:00
Jean-Philippe Andre 706cf9c488 elm: Fix invalid uses of Efl.Orientation
I think this closes the orientation vs. direction problem.
RTL vs. AnyRTL is not fully handled yet but this becomes a
widget-per-widget issue (eg. should a box in a RTL locale be mirrored if
set to horizontal?).

Fixes T5870
2017-09-19 18:53:35 +09:00
Jean-Philippe Andre d3cf6093aa animation2: fix compile instruction
Summary:
without it, it was failing with following error
/usr/bin/ld: /tmp/ccnjRcVr.o: undefined reference to symbol 'evas_object_move'
//usr/lib64/libevas.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Test Plan: just try to compile it with and without.

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5182
2017-09-19 17:00:35 +09:00
Stefan Schmidt ca6a1e25f5 examples: cxx: fix examples for new size_set function signature
This no longer takes two parameters. Update to the new signature.
2017-09-19 08:32:43 +02:00
Jean-Philippe Andre 2df8ad36b4 evas: Use Eina.Slice on the stack (gfx.buffer) 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre 1f242afdef evas: Use Eina.Size2D for gfx.buffer
For consistency.
2017-09-19 10:51:48 +09:00
Bryce Harrington 93d339b5ed examples: document the evas-vg-simple example
Summary:
Fill in the intro section and the first test mode.  (Docs for second
mode will be forthcoming.)

Also drop some of the generic comments that are already explained better
in some of the basic examples.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5201

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-09-18 11:18:43 -07:00
Jean-Philippe Andre a72f3ec64e efl: Use Eina.Size2D for size hint combined min
For this patch I decided to add a pseudo legacy wrapper as the function
is called in a very large number of places. Fixing all those calls to
use the size2d form is a lot of work and a greater risk of b0rking
something.
2017-09-18 16:33:33 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Felipe Magno de Almeida 761e6a304c eolian-cxx: Fix example after disambiguation patch of C++ binding 2017-09-14 15:06:33 -03:00
Stefan Schmidt b737d4fea7 examples/evas: fix recent build break from rectangle change
Introduced with commit 13da5e980e

A compile before pushing would have been great, again.
Having the same name for two variables is something no compiler likes.

evas-map-utils-eo.c:74:8: error: conflicting types for ‘r’
    int r, g, b, a, f;
        ^
evas-map-utils-eo.c:73:19: note: previous declaration of ‘r’ was here
    Eina_Rectangle r;
                   ^
evas-map-utils-eo.c:93:31: error: ‘h’ undeclared (first use in this function)
    efl_gfx_size_get(o, NULL, &h);
                               ^
evas-map-utils-eo.c:93:31: note: each undeclared identifier is reported only once for each function it appears in
evas-map-utils-eo.c:108:25: error: ‘w’ undeclared (first use in this function)
    efl_gfx_size_get(o, &w, &h);
2017-09-13 14:42:34 +02:00
Stefan Schmidt cca312d42c gitignore: add some new example binaries to the ignore list 2017-09-13 11:25:13 +02:00
Jean-Philippe Andre 13da5e980e efl_gfx: Use Eina.Rectangle for geometry (EO)
This saves a few lines already (without even having the proper helpers
for stack rectangles).
2017-09-13 18:03:34 +09:00
Daniel Zaoui a8f86b2c34 Examples: fix C++ examples
The examples have not been updated after the last C++ changes.
2017-09-11 21:13:15 +03:00
Felipe Magno de Almeida 48b3c127f7 eo-cxx: Require instantiate keyword for constructors calling efl_add to avoid ambiguity 2017-09-08 11:47:29 +09:00
Guilherme Iscaro 3ba9f25cf7 Eina_Promise/Eina_Future: Add example and tests. 2017-09-04 10:24:00 -03:00
Jean-Philippe Andre cec45f616a js: Fix some js examples usage of orient API
This was not tested. How to test js?
2017-08-23 15:24:37 +09:00
Bryce Harrington 4202c29996 examples: Improve error message text from Evas examples
Reviewers: cedric, devilhorns

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5103
2017-08-18 09:47:45 -04:00
Bryce Harrington 73c02f0b2c examples/evas: Fix sp. of 'Coult' in warning
Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5102
2017-08-18 09:46:48 -04:00
Guilherme Iscaro 0309981eba Elm Examples: Fix undefined function references.
They were renamed by 599bb616ec

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2017-08-17 10:33:53 +09:00
Jean-Philippe Andre d4b4ee867b evas: Modify wheel events direction to bool (EO)
The orientation was overkill here. We only want a bool.

Ref T5870
2017-08-10 14:42:08 +09:00
Bryce Harrington be5b16850b examples: Correct the comments for key handling
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5076
2017-08-09 12:21:42 +09:00
Bryce Harrington 09d8ff787b examples: Fix sp. exemple_data
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5075
2017-08-09 12:21:42 +09:00
Bryce Harrington 57fdaae824 examples: Fix grammar - 'forcely' is not a word
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5077
2017-08-08 15:28:20 +09:00
Jean-Philippe Andre 9a2d4928f0 elm: Rename elm_layout to Efl.Ui.Layout
Some names have not been changed, hopefully making a distinction
between legacy APIs and internal code (elm_layout_blah) and valid EO
usages.

This means many internal functions are still elm_layout_ as their
sole purpose is to support the legacy API.

Ref T5315
2017-08-08 13:25:58 +09:00
Stefan Schmidt 3adf2ebddf examples: fix build break after efl_ui_panes change
In commit 40945d9859 it was renamed but
the examples not updated.
2017-08-07 12:39:10 +02:00
Jean-Philippe Andre efac7d523a edje: Move signal APIs to an interface
This interface will be used by elm_layout as well.

Ref T5315
2017-08-04 11:52:16 +09:00
Guilherme Iscaro 45a767632d Ecore_Conn: Enable CLOEXEC by default.
This flag should be enabled by default in order to avoid socket leaks.
2017-07-27 16:54:34 +02:00
Stefan Schmidt 02bbcabd3f examples: elm_icon: remove no-op deprecated function call for icon lookup
The function is deprecated and actually a no-op already. Better make
sure we do not promote deprecated functions in our won examples.
2017-07-14 14:06:34 +02:00
Bryce Harrington 0e19bde33c examples: Move introduction to Ecore-Evas to evas-transparent.c
Summary:
The evas-transparent.c example is quite short, and so will allow for
more detailed explanation of setting up Ecore-Evas.  Then
evas-object-manipulation.c can focus more on the explanation of objects
in Ecore-Evas.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5011
2017-07-11 11:29:07 +09:00
Bryce Harrington 824df3d37b examples: Flesh out the evas-object-manipulation example
Summary:
This is one of the basic examples that introduces Ecore-Evas, so needs
to be more detailed in commentary than other examples.  It also points
out the use of the legacy API and directs the reader to the Eo example
where appropriate.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D5008
2017-07-10 17:02:20 +09:00
smohanty 4650a62e85 evas/vg: rewrite the vg example with more test cases
basic shape, stroke, transformation, interpolation test cases added

Reviewers: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4992
2017-06-29 17:39:11 +09:00
Vincent Torri fb6530ca2e examples/elm: Use POSIX threads on Windows 2017-06-20 14:34:52 +09:00
Vincent Torri aa17e28e5a examples/net: Fix compilation on Windows 2017-06-20 14:34:52 +09:00
Vincent Torri d03780fdf9 examples/net: Fix compilation on Windows (no getline)
Thnaks @vtorri who authored this patch
2017-06-20 14:18:36 +09:00
Jean-Philippe Andre 6e33145332 examples/net: Use PRIi64 where appropriate
Fixes a warning on Windows. Thanks @vtorri
2017-06-20 14:16:40 +09:00
Jean-Philippe Andre 98b1309c6f cxx examples: Fix button example 00
Text part API has changed.
2017-06-20 14:09:57 +09:00
Cedric BAIL 5c16d4e15b evas: batman use legacy API only. 2017-06-19 14:08:54 -07:00
smohanty d6bd5d52fc evas/vg: Fixed the build issue in evas_vg_simple example
Reviewers: jpeg, vtorri

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4980

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-19 14:08:54 -07:00
Lauro Moura c4558e2910 js: Update after many elm/efl.ui changes
- Win.Standard
- Photocam to Image.Zoomable rename
- Widget namespace changes (elm -> efl.ui)
- setText/setPartText changes (see 3eb649b18)
2017-06-19 17:36:41 -03:00
Jeeyong Um 864e854fa9 example: Add missing definition to invoke EO API 2017-06-19 13:19:30 +09:00
Andrii Kroitor c099ede159 examples: fix ecore_exe_child example to work properly on Windows
Summary: ecore_main_fd_handler_add is not working on Windows

Reviewers: vtorri, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4470
2017-06-15 12:18:42 +09:00
Jean-Philippe Andre e8f9f109a6 evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where
   it's a keyword. Type is a little better. Also, the property
   was already named "device_type" and not "device_class".

2. Remove Efl.Input.Device.Sub_Class
   It's not used inside EFL upstream codebase, and unlikely to
   be used anywhere else (even in Tizen).

Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.

Ref T5540
2017-06-12 15:21:55 +09:00
Jean-Philippe Andre 83d18617b4 evas: Remove device "parent", "name" and "description" properties
Those are now merged with Efl.Object parent, name and comment.
The reasoning is that only seats can be parent devices; And name
and description are not only name clashes but also not extremely
useful anyway.

Tested with VNC.

Fixes T5540
2017-06-12 15:17:50 +09:00
Bryce Harrington 7e552977a6 examples: Flesh out the evas-buffer-simple example
Summary:
This serves as an early example for new Evas programmers to introduce
the buffer engine as well as very basic canvas usage, so we're going
into a lot more detail for both of those than we'll do in subsequent
examples.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4950
2017-06-09 12:09:54 +09:00
Bryce Harrington 3d46c390f7 evas/examples: add intro for evas-event-filter.c example
Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4907

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:57 -07:00
Bryce Harrington 8834ea1927 evas/examples: fix minor typo 'whe'
Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4906

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:57 -07:00
Bryce Harrington 2f74d75a39 examples/evas: add tutorial commentary for evas-init-shutdown
Summary:
This is the most basic of the Evas examples and serves as the starting
point for new Evas users.  Since this targets neophytes, we can afford
to be much more detailed in commentary.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4904

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:57 -07:00
Bryce Harrington c618dee0f7 examples/evas: add a README
Summary:
Categorize the examples by topic, and identify certain examples as
introductory; these can be commented more verbosely than the other
examples.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4903

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:07:56 -07:00
Al Poole de156c66ed examples: fix efl_net_control_example.c on BSD.
Reviewers: cedric, stefan_schmidt

Subscribers: stefan_schmidt, jpeg

Differential Revision: https://phab.enlightenment.org/D4868

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-06-05 12:04:43 -07:00
Stefan Schmidt 4d13211116 examples: edje: make sure we use the edje_object_language_set legacy API
The EO based edje_obj_language_set API is now longer available since a
rework of this API. Also make sure a used parameter is not marked as
unused.
2017-06-02 09:21:49 +02:00
Jean-Philippe Andre 81eb7a3f0b examples: Test API efl_input_device_children_iterate
While the API seems to work fine, I am not 100% sure the device
names are properly assigned.

Run ecore_evas_cursor_example or ecore_evas_vnc_example and
then connect to the VNC server locally or remotely.
2017-05-24 16:06:18 +09:00
Amitesh Singh 850498e977 rename elm_button to Efl.Ui.Button
ref T5323

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-22 17:28:47 +09:00
Jean-Philippe Andre 7c5808f451 c++: Fix examples as Win.Standard was removed 2017-05-17 15:43:58 +09:00
Stefan Schmidt 75727592df examples: evas: fix else block by adding needed parenthesis
This was broken since over a year. Happened during the automatic eo4
migration in f21ade6123.

Thanks goes to the gcc warning misleading-indentation:

evas-3d-shadows.c:163:4: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
    else
    ^~~~
evas-3d-shadows.c:165:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
      evas_canvas3d_node_look_at_set(scene->mediator, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 3.0, 0.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 5.0, 0.0);
2017-05-16 21:58:35 +02:00
Bryce Harrington 9f9d2177bf examples/evas: Fix weird use of word synchrony in comment
Summary: 'keep in sync' is more familiar programmer jargon.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4876
2017-05-12 14:42:29 +09:00
Jean-Philippe Andre c6d6e13060 evas map: Rename raw_coord to coord_absolute
This is more in line with the other "absolute" APIs.
2017-05-12 12:02:24 +09:00
Jean-Philippe Andre 0a224da86f evas map: Introduce new API for maps (Efl.Gfx.Map)
This implements an entirely new API model for Evas Map by relying
on high-level transformations on the object rather than an external
Evas_Map structure that needs to be constantly updated manually.

The implementation relies on Evas_Map.

To rotate an object all you need to do now is
  efl_gfx_map_rotate(obj, 45.0, NULL, 0.5, 0.5);

Or with a C++ syntax:
  obj.rotate(45.0, NULL, 0.5, 0.5);

Or even simply (with default arguments):
  obj.rotate(45.0);

The map transformation functions are:
 - rotate
 - rotate_3d
 - rotate_quat
 - zoom
 - translate (new!)
 - perspective_3d
 - lightning_3d

@feature
2017-05-11 17:54:00 +09:00
Jean-Philippe Andre 70821182ff evas examples: Fix invalid assumption about proxy
In the map examples, the map image UV size was based on the image
source geometry, rather than the image geometry itself.

In the example, this affects how the glass is mirrored. Before this
patch, the reflection is a single line stretched. EFL 1.18 and 1.19
seem to have the same issue, while 1.17 simply fails to show any
reflection. 1.16 fails miserably and the entire window is black.

If the original code was correct, then I believe that map and/or
proxy rendering have been modified in a way that affects the meaning
of those image UV parameters. But this seems like the regression (if
it is one) is in fact quite old.

@fix
2017-05-11 17:53:51 +09:00
Bryce Harrington c6212e6e67 examples/evas: Improve linespacing consistency
Summary:
Also fixes a handful of obvious indentation irregularities,
including some reformatting of some printf() multi-line indents that
commit a71b770b did not properly adjust.

No functional code changes.

Reviewers: cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4864
2017-05-10 11:03:38 +02:00
Bryce Harrington cee4d928cf examples/evas: streamline the intro description statement for examples
Summary:
For people browing through the examples, having the opening statement be
concise and consistent will help them more quickly find what they're
looking for.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Test Plan:
Some of the examples had identical opening statements (e.g. the image
object examples).  I've tried to give each a unique description defining
what they are demonstrating, but you may want to doublecheck I got these
correct.  Of particular note, to me evas-images5.c looks like just a
fixup to evas-images4.c, so I'm not sure what makes these two distinct.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4861

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-08 15:26:07 -07:00
Bryce Harrington 77e19c7194 examples: use printf instead of fprintf(stdout, ...)
Summary:
Applies same change as e8355c93 for evas, to the remaining examples.
This uses the shell command-line:

    src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 \
        | uniq | xargs sed -i "s/fprintf(stdout/printf(/"

Note that use of the "fprintf(stdout" construct can generate warnings
when -Wformat-security is enabled, if the fprintf statement has no
format arguments, so in addition to the stylistic simplification this
also helps quell those spurious warnings.

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4836

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-05-08 15:14:29 -07:00
Bryce Harrington ccd78c7708 examples/evas: Fix missing space before -lm in compilation directions
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4835
2017-05-03 12:03:40 +02:00
Bryce Harrington 9a9dcd5e44 examples/evas: fix spelling
Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4807

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-25 16:28:44 -07:00
Jeeyong Um e105646041 edje_cc: introduce "Anchors" - easy way to set parts relationship
Test Plan: compile src/examples/edc-anchors.c and run

Reviewers: zmike, raster, cedric, jpeg

Reviewed By: raster, jpeg

Subscribers: raster, barbieri, zmike, SanghyeonLee, taxi2se, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D4775

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-25 16:25:15 -07:00
Jean-Philippe Andre bcf3ce8428 examples: Fix most trivial warnings
This fixes all warnings for "make examples" for:
 -Wunused-parameter
 -Wshadow
 -Wformat-security
 -Wenum-conversion

Some remaining warnings include:
 -Wdeprecated-delcarations
2017-04-20 17:44:57 +09:00
Bryce Harrington a71b770bbc examples/evas: Use printf instead of fprintf(stdout, ...)
Summary:
Applies the correction purely mechanically using the following shell
command-line:

    src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 | uniq | \
        xargs sed -i "s/fprintf(stdout/printf(/"

This fixes a few warnings about lack of a format string:

    warning: format not a string literal and no format arguments [-Wformat-security]
        fprintf(stdout, commands);

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4691
2017-04-20 17:31:58 +09:00
Cedric BAIL 91e87c5f05 ecore: use new API eina_file_close_on_exec in example too. 2017-04-18 16:57:36 -07:00
Shinwoo Kim 4f6873905b ecore_input: add API to get name of joystick.
Summary:
The Ecore_Event_Joystick would be not enough information on user side.
Because the button index such as ECORE_EVENT_JOYSTICK_BUTTON_SELECT/START/META,
etc could be mapped to different button for different named joystick.

Test Plan: Using example

Reviewers: raster, cedric, jpeg

Reviewed By: raster

Differential Revision: https://phab.enlightenment.org/D4669
2017-04-13 14:53:48 +09:00
Cedric BAIL bb83ff9094 ecore_evas: fix use of new VNC API in example. 2017-04-12 15:13:19 -07:00
Gustavo Sverzut Barbieri fa0e2865a1 implement efl_net_{socket,dialer,server}_windows
This is the local socket for windows, analogous to AF_UNIX.

`Efl_Net_Socket_Windows` is the base class doing `ReadFile()` and
`WriteFile()` using overlapped I/O, as well as the close procedure
(`FlushFileBuffers()`, `DisconnectNamedPipe()` and
`CloseHandle()`). These are done on top of an existing HANDLE that is
set by `Efl_Net_Dialer_Windows` (from `CreateFile()`) or
`Efl_Net_Server_Windows` (from `CreateNamedPipe()`).

The overlapped I/O will return immediately, either with operation
completed or `ERROR_IO_PENDING`, which means the kernel will execute
that asynchronously and will later `SetEvent(overlapped.hEvent)` which
is an event we wait on our main loop. That `overlapped` handle must
exist during the call lifetime, thus cannot be bound to `pd`, as we
may call `CancelIo()` but there is no guarantee the memory won't be
touched, in that case we keep the overlapped around, but without an
associated object.

Windows provides no notification "can read without blocking" or
non-blocking calls that returns partial data. The way to go is to use
these overlapped I/O, with an initial `ReadFile()` to an internal
buffer, once that operation finishes, we callback the user to says
there is something to read (`efl_io_reader_can_read_set()`) and wait
until `efl_io_reader_read()` is called to consume the available data,
then `ReadFile()` is called again to read more data to the same
internal buffer.

Likewise, there is no "can write without blocking" or non-blocking
calls that sends only partial data. The way to go is to get user bytes
in `efl_io_writer_write()` and copy them in an internal buffer, then
call `WriteFile()` on that and inform the user nothing else can be
written until that operation completes
(`efl_io_writer_can_write_set()`).

This is cumbersome since we say we "sent" stuff when we actually
didn't, it's still in our internal buffer (`pd->send.bytes`), but
nonetheless the kernel and the other peer may be adding even more
buffers, in this case we need to do a best effort to get it
delivery. A particular case is troublesome: `write() -> close()`, this
may result in `WriteFile()` pending, in this case we wait using
`GetOverlappedResult()`, *this is nasty and may block*, but it's the
only way I see to cope with such common use case.

Other operations, like ongoing `ReadFile()` or `ConnectNamedPipe()`
will be canceled using `CancelIo()`.

Q: Why no I/O Completion Port (IOCP) was used? Why no
   CreateThreadpoolIo()? These perform much better!

A: These will call back from secondary threads, but in EFL we must
   report back to the user in order to process incoming data or get
   more data to send. That is, we serialize everything to the main
   thread, making it impossible to use the benefits of IOCP and
   similar such as CreateThreadpoolIo(). Since we'd need to wakeup the
   main thread anyways, using `OVERLAPPED.hEvent` with
   `ecore_main_win32_handler_add()` does the job as we expect.

Thanks to Vincent Torri (vtorri) for his help getting this code done
with an example on how to do the NamedPipe handling on Windows.
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 17444557de ecore_con_*_example: compile on win32.
- win32 doesn't provide getline().
 - _write() exists, use _write_() instead
2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 8f6e3265b6 ecore_ipc_client_example: win32 doesn't provide getline(). 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri bfe2988f4d efl_net_dialer_unix_example: read in loop while "can_read".
While in UNIX we use 'select()/poll()' to query for read fds and this
will eventually callback with "can_read" event, use the loop to match
other implementations where can_read keeps true if not all data was
read.
2017-03-29 12:44:19 -03:00
Carsten Haitzler eac53691f9 fix ecore con client exmaple to match cmdline help output for options 2017-03-29 16:49:03 +09:00
Carsten Haitzler feeff68401 fix ecore con server exmaple to match cmdline help output for options 2017-03-29 16:28:21 +09:00
Jean Guyomarc'h c57daa030d edje/examples: don't alter source directory
We would have removed files from the source directory before... oops...
2017-03-11 00:04:48 +01:00
Jean Guyomarc'h 7ef27a4669 eldbus: don't abs() an unsigned value
clang complained about abs() being used on an unsigned integer.
Calling abs() is actually unnecessary.
2017-03-09 23:16:16 +01:00
Jean Guyomarc'h 660259b46d eio: fix printf format error 2017-03-09 23:16:16 +01:00
Jean Guyomarc'h a0a957bb7d edje: make sure the po files are well-copied once 2017-03-09 23:16:16 +01:00
Jean Guyomarc'h 8d2c6189fa edje: use portable cp options
The -u option is GNU-specific.
2017-03-09 23:16:16 +01:00
Lauro Moura eb041fb6a0 js: Update examples, including window api changes.
Window now inherits from Container instead of Pack.

Also removed some deprecated stuff.
2017-02-22 18:56:30 -03:00
Bryce Harrington 2ea9e7010c examples: Use printf instead of fprintf(stdout, ...)
Summary:
Also fix warning about lack of a format string:

    warning: format not a string literal and no format arguments [-Wformat-security]
         fprintf(stdout, commands);

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4673
2017-02-21 10:46:28 +09:00
Shinwoo Kim 32fbf64d28 ecore_input: add API to set/get deadzone of joystick event for an axis.
Summary:
The axis type joystick event could occur without user's control if joystick is too sensitive.
The deadzone prevents this unnecessary event. The default value is 200.
The event value for an axis is a signed integer between -32767 and +32767.

Test Plan: Using example

Reviewers: raster, cedric, jpeg

Reviewed By: jpeg

Subscribers: stefan_schmidt

Differential Revision: https://phab.enlightenment.org/D4654
2017-02-15 13:03:02 +09:00
Stefan Schmidt 3f50c73031 elm: examples: add new layout_model_connect binary to gitignore 2017-02-09 14:47:22 +01:00
Larry Jr 093c592188 efl: add efl_model and efl_ui_view classes
Efl.Model.Container and Efl.Model.Item to efl/interfaces are used
to create Efl.Model objects with predefined property values.
This is useful to any situation where we want an Efl.Model with
explicit defined property values.

Efl.Ui.View and Efl.Ui.Factory are used to connect Efl.Models with
Widgets, Elm.Layout and Efl.Ui.Image has changed to use news interfaces

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-06 15:26:21 -08:00
Jerome Pinot 1fd5c941b9 edje_example: fix compile instruction 2017-02-05 21:56:18 +09:00
Bruno Dilly b251e1a4ac edje: change seat signals
Use seat names as prefix, not as suffix, following
a top-down approach and avoiding issues
with applications that may be receiving
doubled signals (legacy + suffixed).

So instead of "mouse,in,seat1" signal will be
"seat,seat1,mouse,in".
2017-02-01 17:19:32 -02:00
Felipe Magno de Almeida a1f2db255b cxx: Modify how to generate C++ headers and allow cyclic dependencies
Allow cyclic dependencies in generated C++ headers by changing order
of includes and creating forward declarations.
2017-01-18 22:47:04 -02:00