Compare commits

...

1137 Commits

Author SHA1 Message Date
Xavi Artigas df21c3770e calculator: Adapt to latest Text_Cursor API 2020-04-27 12:19:03 +02:00
Xavi Artigas f835d45622 mono calculator: fix font size of main screen
Apparently setting editable=false resets the font size.
While we investigate that, this is a workaround.
2020-02-20 18:57:35 +01:00
Xavi Artigas 5f1be675ee mono-examples: Adapt to latest syntax
Setter and Getters have disappeared. Now everything is accessed through properties like:
Text, Disabled, Autohide, Color, Orientation, ContentPadding, Size, ScrollableText, Align, Name.
Also the Life and Containers examples had several issues.
Text override from custom widgets is still not solved.
2020-02-20 18:48:55 +01:00
Xavi Artigas 6e77c4aae2 homescreen: Do not show apps that do not want to be shown
As mandated by the .desktop files.
Otherwise, you might get missing icons.
2020-02-20 16:55:35 +01:00
Xavi Artigas f3076c6d19 homescreen: Simplify code and UI structure
Remove global variables.
Add comments.
General beautification.
2020-02-20 16:55:35 +01:00
Xavi Artigas ac5879e3e5 homescreen: Initial import from bu5hm4n code
Just removed custom Edje classes and tried to replace them with
Efl.Ui classes (for simplicity).
2020-02-12 10:27:59 +01:00
Xavi Artigas b694a830af Updated .gitignore 2020-02-12 10:27:17 +01:00
Xavi Artigas 6a470840d9 mono-examples: Adapt to latest syntax (EventArgs.arg -> Arg)
Also workaround some temporary inability to set struct members.
2020-02-07 09:49:57 +01:00
Xavi Artigas dfa678e9dc Add the now-mandatory @since tags to example EO files 2020-02-07 09:11:59 +01:00
Xavi Artigas 4b6740b258 Adapt Eina.Array example to latest syntax 2020-01-17 10:18:13 +01:00
Ali Alzyod 870cda6730 EXAMPLES efl.text.style: reflect updates
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D10898
2019-12-20 10:01:00 +01:00
Xavi Artigas be0ade4350 Adapt to latest Textbox changes 2019-12-17 16:34:34 +01:00
Xavi Artigas 6f183d62c2 Adapt to latest changes
Including removal of the manual inclusion of text headers!
2019-12-13 13:27:06 +01:00
Xavi Artigas cba451e99b More adaptation to latest Text changes
Previous fix relied on old headers still being present, which is not good.
2019-12-11 15:51:03 +01:00
Xavi Artigas aeaba83065 Adapt to latest Text changes 2019-12-09 15:46:27 +01:00
Xavi Artigas 868ed77548 Update code comments (and typos) 2019-10-28 09:48:42 +01:00
Xavi Artigas d57c8e2d28 Add documentation for C and C# calculator examples 2019-10-24 12:44:25 +02:00
Xavi Artigas f9486b6bfd Example C# calculator app
For simplicity, only integer operations and no direct editing of the numbers.
This is meant as a simple UI example, not as a CS exercise.
2019-10-24 10:54:17 +02:00
Xavi Artigas 8caeaaf071 Example C Calculator app
For simplicity, only integer operations and no direct editing of the numbers.
This is meant as a simple UI example, not as a CS exercise.
2019-10-23 17:11:33 +02:00
Xavi Artigas 95c373e8e3 Only ignore topmost meson.build
This is autogenerated, but not all other meson.build files in subdirs.
2019-10-23 13:37:58 +02:00
Lauro Moura b8f57276ef Initial version of demo MVVM app
Summary:
For now, a static model with a simple CollectionView.

The idea is to create a model that fetches some info from the web,
like weather forecast, and show it to the user.

Depends on D10300

Reviewers: SanghyeonLee, felipealmeida, cedric, bu5hm4n

Reviewed By: SanghyeonLee

Subscribers: brunobelo

Differential Revision: https://phab.enlightenment.org/D10302
2019-10-17 13:09:27 -03:00
Xavi Artigas b8fd0c3b74 Adapt examples to latest Unified API changes
Efl.Ui.Text headers have to be manually included for now, since they still depend
on Legacy headers.
Padding API has lost a parameter.
2019-10-03 12:19:03 +02:00
Xavi Artigas 0a23c904cb Game of Life: Remove last uses of Legacy API 2019-10-03 12:12:38 +02:00
Xavi Artigas 6dfa4bac1d cs snippets: small updates to Slider and Box 2019-10-02 16:27:28 +02:00
Lukasz Oleksak 9f0eebb54f Example code for Efl.Ui.* widgets
Reviewers: segfaultxavi, woohyun

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D10269
2019-10-02 16:24:48 +02:00
Lukasz Oleksak 670a6bc902 Example code for Efl.Ui.Win
Reviewers: segfaultxavi, woohyun

Reviewed By: segfaultxavi

Tags: #efl, #examples

Differential Revision: https://phab.enlightenment.org/D9982
2019-09-23 13:12:12 +02:00
Mike Blumenkrantz fea913d1e1 life: remove Elementary.h usage
Summary: this should not be needed

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Tags: #examples

Differential Revision: https://phab.enlightenment.org/D10021
2019-09-19 16:33:08 +02:00
Xavi Artigas fd32510f35 mono snippets: Added README in the snippets folder 2019-09-17 12:10:22 +02:00
Bruno da Silva Belo 242ed076f3 csharp: Basic components for all tests without Ui.
Summary:
Uiless tests use basic components.
Make test terminate again.

Reviewers: lauromoura, felipealmeida, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: brunobelo, felipealmeida, lauromoura

Differential Revision: https://phab.enlightenment.org/D9916
2019-09-12 15:04:11 +02:00
Xavi Artigas f161620f9f mono-examples: Do not initialize the UI component if it is not needed 2019-09-12 11:20:37 +02:00
Lauro Moura 3aecb39a18 csharp: Use basic components in core event test
Summary: No need to start elm, as T7770 was fixed.

Reviewers: brunobelo, felipealmeida

Reviewed By: brunobelo

Differential Revision: https://phab.enlightenment.org/D9915
2019-09-11 18:05:28 -03:00
Xavi Artigas 5a4c817d16 mono-examples: Use Del() to dispose of widgets 2019-09-09 22:10:43 +02:00
Xavi Artigas 40801d9285 mono-examples: adapt to latest bindings syntax 2019-09-06 16:10:16 +02:00
Xavi Artigas 5472a77fb3 mono-examples: adapt to latest bindings syntax 2019-09-06 16:01:45 +02:00
Ali Alzyod 17609ba6bf example: fix compilation error
Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D9815
2019-09-02 16:18:46 +02:00
Xavi Artigas 93120a13f5 Adapt to latest changes in Efl.Ui.AlertPopup 2019-08-27 13:22:00 +02:00
Bruno da Silva Belo fa93b9f7c0 Fixing compiles errors from examples, c and c#.
Summary: Change from efl broke the compilation of examples, updating names to the new changes.

Reviewers: lauromoura, felipealmeida

Reviewed By: lauromoura

Differential Revision: https://phab.enlightenment.org/D9581
2019-08-16 15:31:38 -03:00
Xavi Artigas e8245fe5dd Remove EFL_EO_API_SUPPORT
This is not needed anymore.
2019-07-24 12:11:58 +02:00
Xavi Artigas 4c2c569c7e hello-gui: make text non-editable
Non-editable was the default when these tutorials were created, but not anymore.
2019-07-17 12:49:42 +02:00
Lauro Moura 9ed9d94501 csharp: Make examples build again.
Summary: OnInitialize changed signature in D9178

Reviewers: vitor.sousa, segfaultxavi

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D9213
2019-06-28 20:04:38 -03:00
Xavi Artigas a49641d9b4 efl-mono: Make the setup.py script work again
It was broken when the snippets folder was added without a meson.build file.
2019-06-14 12:46:50 +02:00
Xavi Artigas b2c7e2c2dd efl-mono: Add custom widget example 2019-06-14 12:27:40 +02:00
Xavi Artigas d325da2119 efl-mono: Efl.Ui.Dir -> Efl.Ui.LayoutOrientation 2019-06-14 12:25:26 +02:00
Xavi Artigas 21567fcccf Efl.Ui.Dir -> Efl.Ui.Layout_Orientation 2019-06-14 11:18:23 +02:00
Xavi Artigas af73959386 Use direction instead of table_direction in table examples
Efl.Ui.Direction.direction is simpler to understand than
Efl.Pack_table.table_direction. Also, the latter might disappear very soon.
2019-05-17 15:26:02 +02:00
Xavi Artigas 836a9edf73 mono examples: Update to latest Efl.Ui.Clickable syntax 2019-05-15 12:01:16 +02:00
Xavi Artigas 05d9b74e19 texteditor app: no need to use efl_part
efl_content_set() will access that part, there's no need to retrieve "efl.content".
Plus, that part is not advertised in the button's EO file, so I am not sure it is
legal to access it.
2019-05-14 17:01:17 +02:00
Xavi Artigas 6cb115480e mono-examples: Update to latest Part syntax 2019-05-07 13:56:23 +02:00
Xavi Artigas fdeb87bb75 Fix alignment of some widgets
Summary:
Commit 78ae9c0ae069ff86e701ff98cf5674cc491ee156 introduced a new API
(efl_gfx_hint_fill_set) and changed the default behavior of aligned widgets.
The same commit made the necessary changes to all examples in the efl repo,
but not in the examples repo.
This patch here aligns the widgets again they way they were meant to.
We have gone 6 months without anybody noticing that the examples did not
render correctly... let's try and add some unit tests later.

Test Plan: Try the hello-gui c tutorial. The text should be centered instead of in a corner.

Reviewers: YOhoho, bu5hm4n

Differential Revision: https://phab.enlightenment.org/D8791
2019-04-30 18:56:39 +02:00
Xavi Artigas b2c41e4e01 mono-examples: Adapt to changes in Efl.Pack 2019-04-26 12:58:15 +02:00
Lauro Moura 595be4aa12 csharp: Update examples after repeated method name
Summary:
In essence, IPack.DoPack became IPack.Pack

Depends on D8650

Reviewers: felipealmeida, vitor.sousa, segfaultxavi

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D8651
2019-04-23 12:33:00 +02:00
Xavi Artigas f47f1f3672 mono-example: Remove ugly static_cast
Since D8550 apps do not need to use static_cast nor Concrete classes.
2019-04-17 11:03:21 +02:00
Xavi Artigas d4e81b7b65 mono-snippets: Add sample property snippet 2019-04-12 09:57:51 +02:00
Xavi Artigas 5f436d2874 mono: Initial snippet example to use with DocFX
eolian_mono now allows external examples to be embedded in the cs files, which
then appear in the DocFX pages.
This new folder is the proposed place to put all these external examples.
2019-04-11 16:21:09 +02:00
Xavi Artigas 169f569af6 Fix runtime ERR regarding WinType
WinType can only be set during construction, so SetWinType() should never
be called. Use the constructor parameter for this.
2019-04-04 13:17:30 +02:00
Xavi Artigas b55e5150c9 mono examples: Adapt to Efl.Csharp.Application
This class simplifies app development, so the examples have to showcase it.
Basically:
- Your app inherits form it
- You do not need to init() or shutdown()
- You override the methods you want (like OnInitialize).

Fixes T7655
Differential Revision: https://phab.enlightenment.org/D8477
2019-03-26 16:24:20 +01:00
Xavi Artigas 871add6fe5 Remove BETA support from Hello Cmd
This tutorial only requires stable API now!
No need to request BETA (or EO) support.
2019-03-25 13:40:03 +01:00
Lauro Moura 735b848660 csharp: Changes after adding I to interfaces
Summary:
 Ref T7751
 Depends on D8397 in the EFL repo

Reviewers: segfaultxavi, vitor.sousa, felipealmeida

Reviewed By: segfaultxavi

Tags: #efl_language_bindings

Maniphest Tasks: T7751

Differential Revision: https://phab.enlightenment.org/D8398
2019-03-22 09:14:27 +01:00
Ali Alzyod 82dd23ba02 Fix Hello World tutorial (multiline support)
Summary: Add the missing multiline enable, to reflect <br> in markup text

Reviewers: segfaultxavi, woohyun, bowonryu

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D8391
2019-03-18 19:32:53 +01:00
Xavi Artigas 43bb6e3896 mono examples: Adapt to latest event names 2019-03-09 16:00:08 +01:00
Xavi Artigas 679c89d98d Adapt to latest event names 2019-03-09 15:54:38 +01:00
Xavi Artigas aad5b641c8 More fixes to adapt to latest API changes
EFL_UI_WIN_BASIC -> EFL_UI_WIN_TYPE_BASIC
2019-03-05 09:30:09 +01:00
Xavi Artigas 3e1aefa7ea Further fixes to adapt to latest API changes 2019-03-04 18:17:36 +01:00
Mike Blumenkrantz d16b7e48bc fix examples build for latest efl 2019-03-02 10:38:07 -05:00
Lauro Moura 780ebf91c5 examples: Changes after optional parameters
Summary:
After a new iteration of D7789, constructor parameters were split among
required and optionals.

This patch depends on making some Efl.Ui.Win parameters optional.

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: vitor.sousa

Tags: #efl_language_bindings

Differential Revision: https://phab.enlightenment.org/D7851
2019-02-07 18:42:36 -02:00
Lauro Moura 09416b5ccf examples: Change Model_Item to Generic_Model
Summary: This class was renamed in D7533 in the EFL repo.

Test Plan: Run examples

Reviewers: segfaultxavi, felipealmeida

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D7850
2019-02-01 10:14:28 +01:00
Felipe Magno de Almeida 1d5a5322df efl-mono: Fix examples based on new D7789 2019-01-28 16:03:49 +09:00
Xavi Artigas 500049f1eb mono-examples: Adapt to latest syntax
Summary:
Removed initializer methods as much as possible to prepare
for when they are removed from the C# bindings.
No functional changes in the examples.
Tutorial text needs to be adapted now.

Test Plan: All examples work as before (the containers one is currently broken, FML).

Reviewers: lauromoura, felipealmeida, vitor.sousa

Reviewed By: lauromoura

Maniphest Tasks: T7508

Differential Revision: https://phab.enlightenment.org/D7695
2019-01-23 14:49:38 +01:00
Lauro Moura e674ff0d97 Add arcconfig
Reviewers: bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D7726
2019-01-23 14:37:33 +01:00
Xavi Artigas af8036ab17 Adapt EO tutorials to latest Eolian inheritance syntax
Rectangle(Efl.Object, ...) -> Rectangle extends Efl.Object implements ...
2019-01-23 11:18:45 +01:00
Xavi Artigas 9751e2ed82 Adapt examples translation API changes
translatable -> l10n
2019-01-18 13:35:35 +01:00
Xavi Artigas a5c08814d8 examples-mono: Update Eina comments to latest syntax 2019-01-15 13:19:08 +01:00
Xavi Artigas e06157c1f6 efl-mono: Use new Eina.Value implicit conversions 2018-12-31 17:36:21 +01:00
Marcel Hollerbach a7c5ff510e Adapt examples to new App API
loop_main has been renamed to app_main.
2018-12-20 16:33:33 +01:00
Xavi Artigas d74a4df994 csharp examples: Adapt to new classes syntax
Summary: Mainly use PascalCase Namespaces and Classes and proper event names.

Test Plan: Check all examples still build.

Reviewers: lauromoura, vitor.sousa, felipealmeida, bu5hm4n

Reviewed By: bu5hm4n

Differential Revision: https://phab.enlightenment.org/D7479
2018-12-19 16:51:15 +01:00
Marcel Hollerbach 656b746be7 README: add instructions for using setup.py 2018-11-19 16:42:12 +01:00
Marcel Hollerbach d8ea961985 build: autodetect if cxx bindings or mono is build
if it is - build the examples, if not - don't add the examples to the
subprojects that are build.
2018-11-19 16:42:12 +01:00
Xavi Artigas e6aa5e6aa0 csharp-texteditor: adapt to new efl.ui.Popup API 2018-11-16 11:50:50 +01:00
Marcel Hollerbach 3052374b49 add those files to .gitignore 2018-11-02 12:30:56 +01:00
Marcel Hollerbach 5b36c351e3 efl_ui_view: keep up with API rename 2018-11-02 12:30:48 +01:00
Lauro Moura c2e4308dd1 csharp: Remove efl-net examples.
Summary:
The Efl.Net library is self contained and the bindings do not expose
it, favoring.the use of C# own networking classes.

Reviewers: segfaultxavi, vitor.sousa, bu5hm4n

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D7228
2018-11-02 12:02:52 +01:00
Marcel Hollerbach 8a4df21de8 here comes a helper script
run python3 ./setup.py in the root directory, this will create a
meson.build and a directory called subdirectry.

You can now simply use the meson.build script as "main" project, all
other projects will be build in this.
2018-10-31 13:42:24 +01:00
Marcel Hollerbach ddb06ddc1b meson: rename a few targets
this is in preparation for the next commit
2018-10-31 13:40:50 +01:00
Xavi Artigas a040529352 csharp texteditor app: Revamping of this example
Summary:
Added save and load buttons.
Added information popups.
Adapted to the style of the rest of the csharp examples.

Reviewers: lauromoura, vitor.sousa, felipealmeida, ajwillia.ms

Reviewed By: lauromoura

Differential Revision: https://phab.enlightenment.org/D7173
2018-10-19 15:30:42 +02:00
Xavi Artigas eb2cf48195 texteditor: use proper part name for button icons
Summary: Nobody noticed that the buttons had no icon?

Reviewers: zmike, ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D7078
2018-09-26 09:29:27 +02:00
Xavi Artigas 764dee4cd3 csharp focus: properly enable focus highlight
Summary:
I think this is the intended way to enable the focus highlight on the whole
window. The previous approach enabled the highlight but did not move the
focus, by the way.

Reviewers: vitor.sousa

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D7073
2018-09-19 10:54:29 -03:00
Xavi Artigas 4c35b0f8c1 csharp: revamp focus example
Summary:
It was a very poor example, the focus highlight did not show on startup,
and the Text widget has a weird management of the focus. Replaced it by
some check boxes, and the About button now moves the focus.

Reviewers: lauromoura, vitor.sousa, felipealmeida, bu5hm4n

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D7056
2018-09-18 13:29:31 -03:00
Xavi Artigas d1e530d256 Moved focus example to proper place
Summary: It is a guide, not a tutorial.

Reviewers: vitor.sousa, lauromoura

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D7055
2018-09-18 12:43:11 -03:00
Xavi Artigas fce18f2ebe csharp: Refactor UI examples
Summary:
Adapt these two UI examples to the style of the Hello World tutorials,
using initialization methods, more comments, and try to avoid creating
vars for widgets.

Reviewers: vitor.sousa, lauromoura

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D7038
2018-09-17 15:03:12 -03:00
Xavi Artigas 44155d8827 csharp: Remove Flush() from eina.Value examples
Summary:
Flush() is not required, the bindings take care of memory. Moreover, it is
confusing for the C# developer, unaccostumed to having to free memory.

Reviewers: vitor.sousa, lauromoura

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D7036
2018-09-17 11:59:01 -03:00
Xavi Artigas accd628bd3 csharp: Comments in eina_value.cs
Reviewers: lauromoura, vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6996
2018-09-06 12:06:02 -03:00
Xavi Artigas a473380cc7 Add Polling tutorial
Reviewers: lauromoura, vitor.sousa, felipealmeida

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6991
2018-09-06 12:01:25 -03:00
Xavi Artigas c371e6f760 csharp: Add Idlers tutorial
Reviewers: lauromoura, vitor.sousa

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6980
2018-09-04 12:09:21 -03:00
Xavi Artigas 6559459bc7 csharp: Add Events tutorial
Reviewers: vitor.sousa, lauromoura

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6953
2018-08-31 12:23:35 -03:00
Xavi Artigas ad93666875 C# Hello Gui tutorial: bring it closer to the C version
Summary:
Configure all widgets inside their constructors and a couple more minor things
to make the C# Hello Gui more similar to the C version, which should simplify
the tutorial.

Reviewers: lauromoura, vitor.sousa

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6906
2018-08-24 11:42:01 -03:00
Xavi Artigas 006760cdf6 C# Hello World tutorial
Summary: This is the first C# tutorial: Hello World. It just creates a window.

Reviewers: vitor.sousa, lauromoura

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6900
2018-08-23 13:33:47 -03:00
Xavi Artigas f6cc19575f csharp tutorials: Add comments to hello-world-gui
Reviewers: lauromoura, vitor.sousa

Reviewed By: vitor.sousa

Differential Revision: https://phab.enlightenment.org/D6892
2018-08-22 10:23:15 -03:00
Mike Blumenkrantz f36e0f43da add makefile for elementary C examples 2018-08-21 16:22:25 -04:00
Mike Blumenkrantz 1c1854c657 sync ecore examples build with current efl tree build 2018-08-21 16:03:44 -04:00
Mike Blumenkrantz fdcd2d337b sync eina examples build with current efl tree build 2018-08-21 15:52:01 -04:00
Mike Blumenkrantz 5e64366537 sync evas examples build with current efl tree build 2018-08-21 15:50:22 -04:00
Mike Blumenkrantz bf52453fc4 sync edje examples build with current efl tree build 2018-08-21 15:46:58 -04:00
Mike Blumenkrantz 3671163a58 add remaining evas examples to build 2018-08-17 14:03:13 -04:00
Mike Blumenkrantz 56623240b7 just use subdir clean rules for unsorted examples build 2018-08-17 14:02:28 -04:00
Mike Blumenkrantz 3fd4ac3b46 add gitignore for merged examples 2018-08-16 16:12:48 -04:00
Mike Blumenkrantz ac12207f44 fix eolian-cxx dependencies
ensure the OBJS are created before trying to use them with parallel make
2018-08-16 16:03:35 -04:00
Mike Blumenkrantz 86a57475d9 use PATH programs for eolian-cxx examples
this should be configured by the overall build system
2018-08-16 15:48:21 -04:00
Mike Blumenkrantz 2f170d6ffb add eolian_cxx examples to overall makefile 2018-08-16 15:48:15 -04:00
Felipe Magno de Almeida 8567a2ebc5 Fix Makefile.examples for eolian_cxx 2018-08-13 17:27:28 -03:00
Xavi Artigas a9c2388e0d tutorial: Fix behavior of "New" button in texteditor
Summary:
When "New" is pressed, the button should become disabled, because
the file is empty and there is nothing to lose. The "New" button
should only be enabled when there is text to lose by pressing it.

Otherwise, there is no way in the code to disable the button except
at startup, which does not make much sense.

Reviewers: ajwillia.ms, zmike, bu5hm4n

Reviewed By: ajwillia.ms

Tags: #examples

Differential Revision: https://phab.enlightenment.org/D6512
2018-08-10 12:59:52 -04:00
Mike Blumenkrantz fa5d7f80c5 fix some example builds 2018-08-10 09:38:12 -04:00
Mike Blumenkrantz fabab68024 merge all files from efl.git/src/examples 2018-08-09 17:39:17 -04:00
Mike Blumenkrantz d9bc92888a examples 2018-08-09 16:21:58 -04:00
Mike Blumenkrantz 471e5a2e5c build: remove BUILT_SOURCES usage from cxx examples makefiles
ref T7154

Differential Revision: https://phab.enlightenment.org/D6656
2018-08-03 13:47:25 +02:00
Mike Blumenkrantz 9126f7fc39 build: move src/examples/ to a single makefile
this greatly improves build times by improving parallelizing, though it
does introduce more BUILT_SOURCES usage which causes builds with cxx
bindings to take significantly longer

fix T7157
ref T7154

Differential Revision: https://phab.enlightenment.org/D6633
2018-08-03 13:09:22 +02:00
Felipe Magno de Almeida 095d4200b4 Efl.Ui.Layout.Factory: added missing factory_model_connect
Summary:
connect factory to edje part name
when create a new layout connect a factory to it
change example to use the factory_model_connect

Reviewers: felipealmeida

Differential Revision: https://phab.enlightenment.org/D6667
2018-08-01 19:37:37 -03:00
Xavi Artigas 779e0a2cb8 tutorials: Fix C# Life tutorial
Summary:
Fix API changes, plus several logic and syntax errors... again, this had
never been built.

Test Plan:
Didn't build before, builds and runs now, although with some runtime issues
that will be tracked on a separate issue.

Reviewers: felipealmeida, lauromoura, bu5hm4n

Differential Revision: https://phab.enlightenment.org/D6649
2018-07-23 13:16:54 -03:00
Xavi Artigas 3631f36cb0 efl: fix some warnings in examples
Summary:
- Check return vaule of fread()
- Uninitialized var (seriously!)
- Weird struct assignment

Still one warning remains, pending evaluation of T7166.

Fixes T6718

Test Plan:
Those 3 warnings have disappeared and the related example still works
as expected.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6718

Differential Revision: https://phab.enlightenment.org/D6631
2018-07-20 10:36:38 -04:00
Mike Blumenkrantz 7ac2d2ca26 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 4cf487cccd 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 7535aa1de3 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 d7bef07039 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
Xavi Artigas f1a5d614f8 tutorials: Fix C# UI reference guides
Summary: These guides needed to be adapted to the new C# API.

Test Plan:
Didn't build before, and now it can be built and run. It has some runtime
errors on exit.

Reviewers: felipealmeida, lauromoura, Hermet

Reviewed By: Hermet

Tags: #examples

Differential Revision: https://phab.enlightenment.org/D6575
2018-07-13 10:15:26 -03:00
Lauro Moura 62ca316375 csharp: Fix gui_main.cs compilation.
Summary:
- Removed the Concrete suffixes
- Changed interfaces to IFoobar
- Event names are now camelcase with 'Evt' suffix
- Methods with the same name as its class are prefixed with 'Do'
  due to C# CamelCase methods (Pack.Pack -> Pack.DoPack)
- Updated efl.ui.win.Type to efl.ui.Win_Type after API renaming

Reviewers: segfaultxavi, felipealmeida

Reviewed By: segfaultxavi

Differential Revision: https://phab.enlightenment.org/D6508
2018-07-13 10:13:02 -03:00
Alastair Poole 8f66ffac93 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 64e2eba9bc 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 122d3c793e evas example: removed unnecessary calls for vg shapes. 2018-06-14 20:30:28 +09:00
Larry Lira 89c3f4a223 examples: fix efl_model parent loop add 2018-06-07 19:15:50 -03:00
Hermet Park b34c40baa4 evas gl: update example code for better user understanding. 2018-05-29 11:27:15 +09:00
Lauro Moura ae8ef9ce48 cxx: Fix examples after part changes
Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-24 16:02:19 -07:00
Lauro Moura d4b0794b75 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 35a0b7f632 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 73876dcbc9 Revert "efl_add_ref - fis to use efl_add properly with a parent."
This reverts commit 2fb5cc3ad09f6aaf82b5d1131ac5ed22ed848bd4.

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 7ce001084a 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 93d75b47c9 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 4eebe1b884 elementary: quick fix for filemvc example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 41e3a6bc3d eldbus: update dbus efl.model example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 5e8827afb2 ecore_con: update efl_net_ip_address_example after migration to new Eina_Future. 2018-05-01 10:39:01 -07:00
Cedric BAIL 7092eb69d0 eio: update efl_io_manager_ls example. 2018-05-01 10:39:01 -07:00
Cedric BAIL 8813cd33dd 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 9fc9db95ed eio: fix example to use the new EINA_VALUE_ARRAY_FOREACH. 2018-05-01 10:39:01 -07:00
SangHyeon Lee a8ea04fc2f 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 f774b7b0ba 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 a547e82da2 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 5ddc8e4f50 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 989e1b73b8 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 0ea1b1d030 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 a8fd2cae54 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 fb666f9788 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 f05ba502b3 Update elementary examples .gitignore
Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:26 -07:00
Xavi Artigas 9793a51e1e 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 bd5a732370 efl_mono: Fix after prop get const change 2018-04-19 14:06:02 -03:00
Stefan Schmidt e0750549e3 examples: cxx: fix some missing const attributes in colourable*
Fixing some fallout from fcae7cab276c2d3b19bb913ad908b67b7dd33089

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 f9f8585f47 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 37abe926f6 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 3d6f4cc48e tests: elementary: fix build break after rename of efl_ui_view examples
Commit ae8df9ba076e6086900353f0e10480bb2302b44d renamed the files but
did not rename the references in the Makefile.
2018-04-05 14:37:47 +02:00
Cedric Bail 23ca86a5c4 evas: parent need to exist to create a vg object. 2018-04-04 16:31:09 -07:00
SangHyeon Lee 5100297b49 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 d76b6b42da evas: for whatever reason the example didn't interpolate the origin before. 2018-04-03 14:26:59 -07:00
Cedric BAIL 039a7118a1 evas: update example to always set a parent for VG node. 2018-04-03 14:26:59 -07:00
Lauro Moura 1242c07e18 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 7d033e0377 efl-mono: Fix compile flags, .config files and class_name in description 2018-04-03 14:01:29 -03:00
Carsten Haitzler 29dda8d2b5 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad1f8c5d587400b27fabab0865017011 and
168849e8a08966ecc284e28f64126a3a85965965
2018-03-29 13:30:55 +09:00
Cedric BAIL 2ded43d89a 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 aee97703bf 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 e55451c2f3 examples: cxx: fix the compilation for slider example. 2018-03-07 19:25:19 +09:00
Carsten Haitzler 0197e7735b Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303bea691c6f7f9472a5dec32d9103c38d.

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

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

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

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 30b2e24c6b efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Mike Blumenkrantz cce178a95d evas3d: update examples to constructor change 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 662503df93 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 d8fe773278 ecore_audio: remove "name" property 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz 8aa84c9ac0 efl-net: rename conflicting "name" properties 2018-02-15 13:11:00 -05:00
Mike Blumenkrantz f8079ef705 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 936e527a5b elementary: efl_ui_list change SegArray tree to Efl.Object 2018-02-15 15:08:54 -02:00
Larry Jr 81f56259a8 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 00228e7835 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 7604985c8e 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 73838ff2b4 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 b7de8d587d examples: Remove duplicated build code for mono examples. 2018-01-25 15:56:08 -03:00
Vincent Torri 3f7b28f9c8 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 734359f7a6 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 5bb61a8b7b examples: evas vg: fix the compilation of vg batman 2018-01-18 15:19:53 +09:00
Vincent Torri 2cc4fda73c 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 7b545cc62a examples: Show off usage of "background" part
See bg_cxx_example_01
2018-01-16 22:04:55 +09:00
Cedric Bail 7fbfb8d9fb ecore: forgotten EFL_MAIN_EX. 2018-01-15 14:22:27 -08:00
Stefan Schmidt a2ff692691 examples: efl_ui_list: remove unused variables 2018-01-15 10:41:58 +01:00
Stefan Schmidt 8f712195b6 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 7aab5bc81d 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 8e1cf2cef6 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 57a71ffda8 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 d709f279ba 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 a3fddfa766 ecore: remove use of efl_main_loop_get from efl_net_session_example. 2018-01-11 11:13:17 -08:00
Cedric Bail e987a51d98 ecore: remove use of efl_main_loop_get from ecore_promise2_example. 2018-01-10 18:16:25 -08:00
Cedric Bail e624e7344a ecore: remove use of efl_main_loop_get from efl_net_server_simple_example. 2018-01-10 18:16:25 -08:00
Cedric Bail c72683d04d ecore: remove use of efl_main_loop_get from efl_net_server_example. 2018-01-10 18:16:25 -08:00
Cedric Bail 792c6e2195 ecore: remove use of efl_main_loop_get from efl_net_dialer_windows_example. 2018-01-10 18:16:25 -08:00
Cedric BAIL 3e6766532b ecore: remove use of efl_main_loop_get from efl_net_dialer_websocket_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL 3491976314 ecore: remove use of efl_main_loop_get from efl_net_dialer_websocket_autobahntestee. 2018-01-09 16:29:30 -08:00
Cedric BAIL a43d44200e ecore: remove use of efl_main_loop_get from efl_net_dialer_unix_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL 35395d4b3c ecore: remove use of efl_main_loop_get from efl_net_dialer_udp_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL 6b937e142b ecore: remove use of efl_main_loop_get from efl_net_dialer_simple_example. 2018-01-09 16:29:30 -08:00
Cedric BAIL deab959a17 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 dc8abf21f4 ecore: remove use of efl_main_loop_get from efl_net_dialer_http_example. 2018-01-08 16:18:52 -08:00
Cedric BAIL 6a769e8ab7 ecore: remove use of efl_main_loop_get from efl_net_control_example. 2018-01-08 16:04:22 -08:00
Cedric BAIL 6dc2a0cd21 ecore: remove use of efl_main_loop_get from efl_io_queue_example. 2018-01-08 15:55:17 -08:00
Cedric BAIL 75f69d7b1b ecore: remove use of efl_main_loop_get from efl_io_copier_simple_example. 2018-01-08 15:47:18 -08:00
Cedric BAIL a0185cd8fa ecore: remove more use of main loop reference from unified API example. 2018-01-08 13:19:48 -08:00
Cedric BAIL 76fa50f58b ecore: remove use of efl_main_loop_get from example. 2018-01-08 10:08:43 -08:00
Jean-Philippe Andre e3068274e6 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 fcb093473a 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 afcca1584a evas: NEAR AND FAR are already defined on Windows 2018-01-04 12:57:33 -08:00
Carsten Haitzler ddf7587449 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 cf0406bfab efl-mono: Fix removal of .exe extension in Linux systems 2017-12-20 19:57:17 -02:00
Lauro Moura b2abcd9d6f 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 a4876097ab examples: Add C# buttons/popup example. 2017-12-19 17:51:51 -02:00
Jean-Philippe Andre 3d38ae0a90 examples: Fix compilation (cxx bg & table)
See 25136ddf8ccbf384b21d89a7ce3939c1d4db00a6
See 0f16a0671008a324d8e1b523fb16ce7b5c1acd6c

Note: This only fixes compilation, not runtime!
2017-12-19 14:36:54 +09:00
Lauro Moura cf43867da1 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 c19ca6fa53 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 17fb2d3c7a 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 00745cda1d 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 04fbce0659 efl_mono: fix test and example compilation on Windows 2017-12-15 22:26:30 -02:00
Cedric Bail 740bbffae8 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 4652fc4cb7 eolian-cxx: Fix distributing eo files in examples 2017-12-14 18:19:54 -02:00
Vitor Sousa 091f8e0f40 efl-mono: Fix examples Makefiles for mono examples 2017-12-14 17:42:42 -02:00
Felipe Magno de Almeida b97089f5a5 efl-cxx: Fixes in automake Makefiles 2017-12-14 17:42:42 -02:00
Amitesh Singh bde43ac97c 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 7123d23fd5 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 efddea19ec efl-cxx: Fixes to make dist 2017-12-13 14:13:09 -02:00
Felipe Magno de Almeida 3afb93d043 elementary: Add efl_ui_list widget 2017-12-13 14:13:09 -02:00
Lauro Moura d2a7efa419 efl_mono: Fix dll.config paths 2017-12-12 22:34:05 -02:00
Cedric BAIL 7b2a1435c0 ecore_con: use Eina_Future for Efl.Net.Control.Technology. 2017-12-11 15:03:11 -08:00
Felipe Magno de Almeida 3da937c1d7 efl-mono: Fix automake files in C# binding search with buggy mono version 2017-12-11 14:45:57 -02:00
Lauro Moura 098aa67a47 examples: Fix after edje_obj canvas_layout change
Summary:
Edje.Object was renamed Efl.Canvas.Layout in

54ae9cc18b6c0fdb9a10f03ad2681587ca062c6c

Reviewers: jpeg, marcelhollerbach, felipealmeida

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5610
2017-12-06 18:52:13 -03:00
Jean-Philippe Andre 1455d7bc1a 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 1e9082c003 cxx: Update slider example 2017-12-05 15:01:45 +09:00
Jean-Philippe Andre 646746cb85 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 d6d0b77e79 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 0ba74a084b 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 f3e3e21f9c 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 d9d619bdd4 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 779aca8bb1 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 154a9e9297 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 288e764f16 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 06b582e6e8 efl_mono: Add examples code.
Buildsystem support will be enabled in a future commit
2017-12-04 15:47:51 -03:00
Jaehyun Cho 379d7cc128 examples: Add popup cxx example 2017-11-28 17:15:42 +09:00
Lauro Moura e4c1d11e1f 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 015a1eb27e cxx: Fix slider example (bad downcast) 2017-11-20 20:42:39 +09:00
Jean-Philippe Andre 7a8880cda4 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 133b49be57 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 d267a3beaa 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 b488461f48 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 51c316ab5f 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 0c3f518ccf 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 58536262cc 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 fc3e1b72df 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 dfb4cc3296 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 668fae61d9 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 3843cd1367 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 5f7c9a708b 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 1d402a967f 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 a106fc6161 eina example: fix eina_value examples 2017-10-30 16:17:16 +09:00
Amitesh Singh 5ac948caba eina: eina_value - Add "struct tm" support
Ref T6204

@feature
2017-10-30 16:04:53 +09:00
Jean-Philippe Andre b94a5c5603 cxx: Fix examples compilation 2017-10-27 10:17:14 +09:00
Amitesh Singh b232994075 examples: eina strbuf - fix the example 2017-10-24 22:48:01 +09:00
Prince Kumar Dubey 2d1734409f 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 aff7dd32b6 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 c5f4087302 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 77ceead6e1 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 99951747be 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 c60c732e34 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 84b82b95f1 eio: fix multiple open/close chain example. 2017-10-09 18:27:56 -07:00
Cedric Bail 0264e5cbf3 eio: update example for openning and closing file asynchronously using a chain. 2017-10-09 17:44:33 -07:00
Subodh Kumar c321def5fc 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 11d553e3c3 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 cbbc077dae eio: migrate example to use Eina_Future. 2017-10-05 14:21:23 -07:00
Cedric BAIL ef40a607fa evas: remove evas_canvas3d_texture_file_set and efl_file_set instead. 2017-10-05 11:36:23 -07:00
Cedric BAIL 6e45ee2e4f ecore_con: simplify Efl.Net.Server.Ssl by inheriting from Efl.Net.Server.Tcp. 2017-09-29 16:01:02 -07:00
Cedric BAIL d2e75c40d0 ecore_con: add an intermediate Efl.Net.Server.Ip 2017-09-29 14:12:03 -07:00
Jean-Philippe Andre 76acfa1a6c 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 7d39dcc23e 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 429cbf8cdb 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 7c541a7453 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 6edeb1ce5e 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 a0bfb3098d evas: Use Eina.Slice on the stack (gfx.buffer) 2017-09-19 10:51:48 +09:00
Jean-Philippe Andre c6d8d60fb6 evas: Use Eina.Size2D for gfx.buffer
For consistency.
2017-09-19 10:51:48 +09:00
Bryce Harrington 8e1f446efc 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 25cd37fdca 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 b331ec013e 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 065fbec948 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 b0fc2825e5 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 3a742b9ad0 eolian-cxx: Fix example after disambiguation patch of C++ binding 2017-09-14 15:06:33 -03:00
Stefan Schmidt 06070eb220 examples/evas: fix recent build break from rectangle change
Introduced with commit 13da5e980eb43288b9b9f502cb6a7a000e1f26ea

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 813a19ac3b gitignore: add some new example binaries to the ignore list 2017-09-13 11:25:13 +02:00
Jean-Philippe Andre 7c352bed15 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 6f259fc2b3 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 4f2d0c7215 eo-cxx: Require instantiate keyword for constructors calling efl_add to avoid ambiguity 2017-09-08 11:47:29 +09:00
Guilherme Iscaro 9487eaeaeb Eina_Promise/Eina_Future: Add example and tests. 2017-09-04 10:24:00 -03:00
Jean-Philippe Andre ce534a75bd 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 6a5216930c 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 5d9fa924a3 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 2e8b23213f Elm Examples: Fix undefined function references.
They were renamed by 599bb616ec5

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2017-08-17 10:33:53 +09:00
Jean-Philippe Andre 43a2cc600b 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 751829a17f 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 686be2a56f 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 b748fcda1a 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 e30760342d 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 28a80845f6 examples: fix build break after efl_ui_panes change
In commit 40945d985967e58d6e6c00ecfd6292a8d67b83b5 it was renamed but
the examples not updated.
2017-08-07 12:39:10 +02:00
Jean-Philippe Andre 1c6fd800e8 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 d25ce7f021 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 266b40d398 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 cd15ad79ff 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 7c0b47b1d0 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 aad1937ef5 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 f4bfa58d4c examples/elm: Use POSIX threads on Windows 2017-06-20 14:34:52 +09:00
Vincent Torri e5739173a0 examples/net: Fix compilation on Windows 2017-06-20 14:34:52 +09:00
Vincent Torri f9fc623244 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 ea4aa58464 examples/net: Use PRIi64 where appropriate
Fixes a warning on Windows. Thanks @vtorri
2017-06-20 14:16:40 +09:00
Jean-Philippe Andre e06f4bdab9 cxx examples: Fix button example 00
Text part API has changed.
2017-06-20 14:09:57 +09:00
Cedric BAIL a130800334 evas: batman use legacy API only. 2017-06-19 14:08:54 -07:00
smohanty b435a0792c 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 7f96a0237e 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 37cd6824ed example: Add missing definition to invoke EO API 2017-06-19 13:19:30 +09:00
Andrii Kroitor 0d2d0f67e8 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 34063c362c 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 165f8ac32e 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 aa9f161802 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 8110e09a8b 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 223b3f6437 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 669170b8d0 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 60e02d4d4f 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 285f10407f 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 e55719cef1 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 ebf459fa2a 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 7e7719a346 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 77c20000d8 c++: Fix examples as Win.Standard was removed 2017-05-17 15:43:58 +09:00
Stefan Schmidt 425a0b2e39 examples: evas: fix else block by adding needed parenthesis
This was broken since over a year. Happened during the automatic eo4
migration in f21ade6123b9053fca8d1632644c48525a99d6e0.

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 770a31371a 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 ad3a612250 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 0e9201f523 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 1529016f9c 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 fbd7313f67 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 e253649f1c 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 71f4be1901 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 5f4ea5ddce 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 24498073b7 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 f8760a6813 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 7e7ff5059e 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 b847d3124b 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 c4dae329e8 ecore: use new API eina_file_close_on_exec in example too. 2017-04-18 16:57:36 -07:00
Shinwoo Kim 0b833586d6 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 74dce2ca6c ecore_evas: fix use of new VNC API in example. 2017-04-12 15:13:19 -07:00
Gustavo Sverzut Barbieri 5136fa380f 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 62e2e21b26 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 c7d8151463 ecore_ipc_client_example: win32 doesn't provide getline(). 2017-03-29 12:44:19 -03:00
Gustavo Sverzut Barbieri 874c1062b0 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 9fb1d8418b fix ecore con client exmaple to match cmdline help output for options 2017-03-29 16:49:03 +09:00
Carsten Haitzler 2be8857184 fix ecore con server exmaple to match cmdline help output for options 2017-03-29 16:28:21 +09:00
Jean Guyomarc'h 010f4bbab7 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 6349db601b 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 58cb4fb34c eio: fix printf format error 2017-03-09 23:16:16 +01:00
Jean Guyomarc'h 7a53e26277 edje: make sure the po files are well-copied once 2017-03-09 23:16:16 +01:00
Jean Guyomarc'h 10863d9bd1 edje: use portable cp options
The -u option is GNU-specific.
2017-03-09 23:16:16 +01:00
Lauro Moura a9823de428 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 a3c79cea43 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 3a35dab1ca 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 5e60cd2863 elm: examples: add new layout_model_connect binary to gitignore 2017-02-09 14:47:22 +01:00
Larry Jr 376c865ad7 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 b199ca0453 edje_example: fix compile instruction 2017-02-05 21:56:18 +09:00
Bruno Dilly 56e71a0b38 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 75eeed28e8 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
Cedric BAIL 5017edad17 ecore_con: use the right type for prototype. 2017-01-06 15:58:46 -08:00
Cedric BAIL 11699a0894 cxx: fix example with recent change. 2017-01-06 15:58:46 -08:00
Bruno Dilly f6e91c3e30 examples/edje: add seat filtering example
4 widgets:
 * seat1 only
 * seat2 only
 * seat1 + seat2
 * any seat
2016-12-21 23:03:33 -02:00
Guilherme Iscaro 421ac7a949 Ecore Evas: Add a new cursor example.
This example sets the cursor image of each available mouse and
report its position every one second.
2016-12-20 18:34:39 -02:00
Gustavo Sverzut Barbieri d66def5bff efl_io_buffer: adopt read-only and read-write buffers.
todo--, allow buffer backing store to be provided by Eina_Slice
(rdonly) or Eina_Rw_Slice (rdwr).
2016-12-19 16:50:58 -02:00
Gustavo Sverzut Barbieri 1d86cbfab4 more eo simplified to use Eina_Slice instead of pointer to.
Working directly with Eina_Slice is easier than a pointer to it,
requires no validation of the pointers and is cheap since it's just
putting together size_t + void*.

However we can't hint the user of 'const(Eina.Slice)' properties as
Eolian is incorrectly generating getters as:

   const Eina_Slice class_property_get(...)

which is makes compilers complain about ignored qualifiers:

   ../src/lib/ecore/efl_io_copier.eo.h:329:7: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]

Leave some TODO so @q66 can fix those.
2016-12-19 15:30:56 -02:00
Gustavo Sverzut Barbieri 8c2013d090 Efl.Io.{Queue,Buffer,Buffered_Stream}: slice_get is now a property.
Previously we couldn't return a slice, instead required the user to
pass a slice and we'd fill it since Eolian couldn't generate fallbacks
for structures.

Since @q66 fixed eolian, we can now return the structure itself as
initially wanted, ditching some TODO from the code.
2016-12-19 15:30:56 -02:00
Bruno Dilly 6979be8215 edje/examples: add example of use_custom_seat_names flag
Since seat names defined on evas will depend on evas backends,
maybe udev rules, etc, we aren't able to demonstrate it
without manually setting another name for such seats
with efl_input_devices_name_set(). Otherwise
we wouldn't have guarantees it would match
names on EDC.
2016-12-19 14:58:35 -02:00
Bruno Dilly d11a8d3682 edje/examples: add example for focus actions
Just a regular (non multiseat) focus example for
actions FOCUS_SET and FOCUS_OBJECT
2016-12-19 14:58:35 -02:00
Bruno Dilly 1a60462fad examples/edje: add dynamic seats example
It's an example of how themes can be implemented even if the number
of seats using the UI is unknown, and how it can be done
using scripts or C code.
2016-12-19 14:58:35 -02:00
Bruno Dilly 1c5ef34f5e edje: support action seats on edje_edit 2016-12-19 14:58:35 -02:00
Bruno Dilly 138dcdeb6f edje: accept optional seat parameter on FOCUS_OBJECT
If not provided, FOCUS_OBJECT action will keep acting
over default seat.

Also include a usage on edje-multiseat test
(actually no example was exercising this action).
2016-12-19 14:58:35 -02:00
Bruno Dilly 9e6d5cf4fa examples/edje: add multiseat example 2016-12-19 14:58:35 -02:00
Guilherme Iscaro 8e5c3cf839 Evas: Add event filter example.
This example exercises the new seat event filter API.
2016-12-12 14:59:22 -02:00
Gustavo Sverzut Barbieri f5d08a4f8f efl_net: add Efl.Net.Ip_Address
This is a string parser, serializer and asynchronous resolver.

It's purpose is to convert to and from the strings we use in our
dialers and servers, such as "127.0.0.1:1234" or "[::1]:1234",
properties allow to check the family, port, address bytes (slice) and
even get a struct sockaddr pointer to use with bind()/connect() in
outside code.

It will also offer some utilities present in netinet/in.h in an easy
to use way, after all IN6_IS_ADDR_LOOPBACK() works one way, while
there is no IN_LOOPBACK and comparing with INADDR_LOOPBACK will lead
to errors since it's in network order.

Last but not least, it will do asynchronous resolve of host and port
names using an internal thread and getaddrinfo(). The results are
delivered using a Future with an array of objects.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 128fe49e8e yoda-style inactivity timeout.
s/inactivity_timeout/timeout_inactivity/g so it matches the EFL names
with scope first, like timeout_connect, etc.
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri 815d40c4bc efl_net: spell check s/revogation/revocation/g
Sorry, in pt_BR it's revoGar... so I did misspell :-)
2016-12-12 02:30:33 -02:00
Gustavo Sverzut Barbieri e8d70e91d9 ecore_con_server_example: add --socket-activated 2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 4894549670 ecore_con_server_example: add tcp+ssl, upgrades a live client.
add a new -t/--type=tcp+ssl, there you can send "Upgrade: SSL\n" to
request the server to start the handshake.

This can be paired with the ecore_con_client_example, there you can
type:

   Upgrade: SSL\n
   STARTTLS\n

The second is a dialer local command to upgrade it to SSL, matching
what the server expects.
2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri e2d8c0bf28 ecore_con_client_example: allow tcp->ssl upgrades.
The example now offers --type=tcp+ssl, in this case it won't send a
"hello!" message to avoid messing with the handshake. Once the client
(dialer) receives the user command STARTTLS
(--starttls-local-command), then it will upgrade the connection.

Usually in real life you need to send some command to server, such as
upgrade, STARTTLS and then upgrade... unless you connect to a SSL-only
server (ie: ecore_con_server_example --type=ssl).
2016-12-10 08:44:06 -02:00
Gustavo Sverzut Barbieri 0ec3aa034e ecore_con_server_example: show client errors. 2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri c5f1b3f476 ecore_con_client_example: allow no-ssl verify and print errors.
allow to not verify server certificate or hostname, so we can test
with local, self-signed certificates.

Also print errors, so we can say that the server handshake failed.
2016-12-08 16:00:01 -02:00
Gustavo Sverzut Barbieri 36273ec57f ecore_con_server_example: allow more features and protocols to be used.
Instead of a single SSL connection, allow for local, tcp and udp,
optional flush and delete-after-write (--single-message) and echo
mode.

Very similar to ecore_ipc_server_example.c
2016-12-08 11:40:45 -02:00
Gustavo Sverzut Barbieri 2f0b1d7955 ecore_con_client_example: allow more features and protocols to be used.
Instead of a single SSL connection, allow for local, tcp and udp,
optional flush and delete-after-write (--single-message).

Very similar to ecore_ipc_client_example.c
2016-12-08 11:40:45 -02:00
Bruno Dilly ff8fb25f32 examples/evas: use new API for key modifiers per seat 2016-12-06 17:09:03 -02:00
Bruno Dilly a86c114d10 eina: remove tests, examples and docs for eina_model
Summary:
Since eina_model was dropped some years ago.
Also a few other points where related stuff is just commented out.

Reviewers: iscaro, barbieri

Reviewed By: barbieri

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4442
2016-11-30 18:37:34 -02:00
Bruno Dilly 207e2fdb42 evas: add example for multiseat events
Also useful to make some tests / debugging.
2016-11-30 16:49:25 -02:00
Bruno Dilly 5186f9c3ae examples/evas: sort gitignore 2016-11-30 16:49:25 -02:00
Gustavo Sverzut Barbieri a0f3a5e91b examples/ecore: build ecore_con_url_ftp_example 2016-11-29 16:03:13 -02:00
Gustavo Sverzut Barbieri c13af29797 ecore_con_url_headers_example: allow POST data. 2016-11-29 16:03:13 -02:00
Bruno Dilly 3f563e3ee6 elementary: fix make examples
After commit
54abdad6e0c20 elementary-cxx: Fix filemvc wrong usage of Efl_Future
it's required to add libethumb_client.la to ELEMENTARY_LDFLAGS
2016-11-28 17:21:42 -02:00
Vitalii Vorobiov 78137cc16a example: update edje-edit-part-box to use not deprecated functions
since box/table item API is deprecated and replaced with new API, it is important
to use them in example as well

Fixes T4931
2016-11-28 17:00:24 +02:00
Felipe Magno de Almeida 600b5e6edd elementary-cxx: Fix filemvc wrong usage of Efl_Future 2016-11-28 12:32:18 -02:00
Gustavo Sverzut Barbieri ac385e4998 efl_net_{socket,dialer,server}_simple: easy to use, buffered network sockets.
The low level I/O primitives are powerful but adds some complexity to
use, for bi-directional streaming communication one ends creating two
Efl.Io.Queue and two Efl.Io.Copier to pipe data to socket when it can
operate.

Then encapsulate the socket using the new Efl.Io.Buffered_Stream, this
will allow the socket, be a dialer or a server client, to be operated
as a single handle that internally carries about the buffering for
you.

As one can see in the examples, compared to their "manual"
alternatives they are very easy to use, ressembling
Ecore_Con_Server/Ecore_Con_Client, but also offers line-based
delimiters and the possibility to let the socket to handle queueing
for you in case you received partial messages (just do not
read/clear/discard the received data).
2016-11-25 17:27:32 -02:00
Gustavo Sverzut Barbieri c9e4ad0a44 efl_io_buffered_stream: wraps an I/O object and make it easy to use.
Since all other efl.io objects are low-level, the recommended approach
is to use an efl.io.copier. However when dealing with in-memory,
bi-directional comms like talking to a socket, we always end with 2
queues, 2 copiers and the annoying setup that is being replicated in
ecore_ipc, efl_debug and so on.

This class is the base to make it simpler. Other classes such as
Efl.Net.Socket.Simple, Efl.Net.Dialer.Simple and Efl.Net.Server.Simple
will use it to provide simpler code to users.

I guess we can call EFL+EO Java now?
2016-11-25 17:27:32 -02:00
Gustavo Sverzut Barbieri 16ad93554a ecore_ipc_server_example: test "write & del" using -m/--single-message
An use case is to send some message and delete the handle, all data
should be sent to client.
2016-11-23 12:57:10 -02:00
Gustavo Sverzut Barbieri 48694ac1cd ecore_ipc_client_example: test "write & del" using -m/--single-message
An use case is to send some message and delete the handle, all data
should be sent to server.
2016-11-23 12:57:10 -02:00
Gustavo Sverzut Barbieri 6aef6645e1 ecore_ipc_server_example: delete clients when they disconnect.
if a client disconnect we must delete them explicitly.
2016-11-22 21:58:14 -02:00
Gustavo Sverzut Barbieri 79edf18a9f ecore_ipc_client_example: better lifecycle management.
If the server is gone, immediately delete it, this exercises deleting
the server from inside its event.

Then, if the server was already deleted, do not do it again.

Also remove the shadow variable, keep only the global scope.
2016-11-22 21:56:41 -02:00
Gustavo Sverzut Barbieri 079e173291 add ecore_ipc_{client,server}_example.
Ecore_Ipc lacked examples so we can explore its API (and check if it
work :-P)
2016-11-22 19:50:11 -02:00
Cedric Bail 87fe6ed0b5 elementary_cxx: fix examples to use the new API. 2016-11-21 16:03:27 -08:00
Gustavo Sverzut Barbieri 696e59caec ecore_file_download_example: allow cancel.
If we ^C to cancel the main loop, then abort the download, this allows
using one more API in the example and provides more correct code.
2016-11-21 19:47:35 -02:00
Gustavo Sverzut Barbieri 8e14389e0b ecore_file_download_example: check the correct file size.
when downloading DST_MIME, check its size, not DST's.
2016-11-21 19:47:35 -02:00
Gustavo Sverzut Barbieri 42337f7f5b ecore_file_download_example: also unlink DST_MIME.
ecore_file_download() will refuse to download if file already exists,
then we must unlink DST_MIME as done with DST before we try to
download, otherwise it won't work on the second time.
2016-11-21 19:47:35 -02:00
Stefan Schmidt e41a3e5537 examples/elementary: bring back datetime_example target
In commit 5929f0311dfc12dac3f38b8f29802e3fa2d0e2d7 this was removed. While
the commits intend was to remove the cxx variant of this example only.

Bring this back so examples are building again.
2016-11-15 17:45:32 +01:00
Felipe Magno de Almeida 299f3ed747 elementary-cxx: Removed example from datetime 2016-11-11 18:07:24 -02:00
Bruno Dilly 3a095c830a efl: add getter for input device's seat
Since this code will be required in many use cases
of the multiseat feature, including examples.

Reviewers: iscaro, barbieri, cedric

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4385
2016-11-09 11:02:38 -02:00
Gustavo Sverzut Barbieri 0e0cac8577 efl_net_session and efl_net_control for ConnMan
These are objects to allow control of networking devices
(efl_net_control) as well as an application to request for
connectivity (efl_net_session).

They are loosely based on ConnMan.org, which we already use in
Enlightenment Window Manager via DBus access with Eldbus. However they
do not map 1:1 as the goal was to expose a viable subset of controls
but in a simple and general way, thus nome strings were converted to
enums, some arrays of strings were converted to bitwise flags, some
names were made more general, such as "service" was turned into
"access point" so it doesn't generate confusion with other "network
services" (ie: http server), or "favorite" that was renamed to
"remembered". Some behavior are slightly different (yet able to be
implemented on top), such as "Service.MoveBefore" and "MoveAfter" were
converted to a numeric "priority", calculated from service's list
index, changing the priority will reoder the list and thus generate
the MoveBefore and MoveAfter DBus commands.

ConnMan was chosen not only because we already use it, but because its
DBus API is sane and simple, with the server doing almost all that we
need. This is visible in the efl_net_session, which is completely done
in the server and do not require any extra work on our side -- aside
from talking DBus and converting to Eo, which is a major work :-D

   NOTE: ConnMan doesn't use FreeDesktop.Org DBus interfaces such as
         Properties and ObjectManager, thus we cannot use
         eldbus_model_object.

There are two examples added:

 - efl_net_session_example: monitors the connection available for an
   application and try to connect. You need a connman compiled with
   session_policy_local and a configuration file explained in
   https://github.com/aldebaran/connman/blob/master/doc/session-policy-format.txt
   to get a connection if nothing is connected. Otherwise it will just
   monitor the connectivity state.

 - efl_net_control_example: monitors, plays the agent and configure
   the network details. It can enable/disable technologies, connect to
   access points (services) and configure them. It's quite extensive
   as allows testing all of ConnMan's DBus API except P2P (Peers).
2016-11-08 22:40:34 -02:00
Guilherme Iscaro f1b1d1354a Ecore Evas VNC: add client disconnected callback.
Summary:
Ecore Evas VNC: Properly unregister the region push hook callback.

This callback must be unregistered when the VNC server is deleted.

Reviewers: bdilly, barbieri, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-07 14:44:40 -08:00
Cedric BAIL 413e6f592b elementary: update example to use Efl_Future. 2016-11-07 11:10:49 -08:00
Guilherme Iscaro df889fec9e VNC Example: Add support to Ecore_Evas FB engine. 2016-11-04 18:29:42 -02:00
Bruno Dilly 843579e166 examples/edje: add example of entry - editable text
Not trivial to be done imo, so it deserves an example.
2016-11-04 18:01:57 -02:00
Bruno Dilly ea8ecbd04e examples/edje: Fix build instructions and titles
Fix a few c&p errors
2016-11-04 18:01:57 -02:00
Bruno Dilly 9f38e3dc49 examples/edje: sort makefile lists 2016-11-04 18:01:57 -02:00
Gustavo Sverzut Barbieri 2485941816 examples/eldbus/dbusmodel.c improve situation, far from correct.
it was using old API, updated, but still doesn't work as expected,
lots of warnings from children being left alive, all proxies are
reporting no properties...

when model dies, all children proxies should die as well, otherwise we
get on console:

```
CRI:eldbus lib/eldbus/eldbus_core.c:215 eldbus_shutdown() Alive TYPE_SYSTEM connection
ERR:eldbus lib/eldbus/eldbus_core.c:175 print_live_connection() conn=0x8219230 alive object=0x8276d50 net.connman of bus=net.connman
...
```

Also, all proxies are reporting no properties "(no properties yet)",
likely they are missing to fetch such... even if "--wait" to let it
run, no asynchronous properties are delivered, at least not triggering
EFL_MODEL_EVENT_PROPERTIES_CHANGED.
2016-11-04 13:19:57 -02:00
Bruno Dilly d0aa248cd3 examples/edje: cosmetic fixes in a couple examples
Fix usage messages, remove unused defines
2016-11-03 18:47:32 -02:00
Gustavo Sverzut Barbieri c5eeb87b50 efl_net_server support systemd socket activation.
It includes extensive verifications to avoid mistakes and usage of
incorrect sockets.
2016-11-01 16:37:04 -02:00
Bruno Dilly 3d1b7cad6b examples/ecore: add example / test for wayland multiseat 2016-11-01 16:06:19 -02:00
Gustavo Sverzut Barbieri f2667f12a6 examples/ecore: command to generate OpenSSL PEM files.
it's cumbersome to remember these commands and without them it's hard
to test the SSL server examples, so add a make rule for that.
2016-11-01 11:52:21 -02:00
Gustavo Sverzut Barbieri 418637624d efl_net_server_example: oops, do not assume all servers are Efl.Net.Server.Fd
SSL server is not an Fd, it contains one internally, but that's
hidden. So call proper methods.
2016-11-01 10:46:38 -02:00
Gustavo Sverzut Barbieri 1ee201e078 efl_net_{server,dialer}_ssl: TCP + SSL easy to use.
in the previous commit we're manually upgrading an existing TCP socket
to SSL. It is desired since some protocols need to negotiate, like
STARTTLS and the likes

Now we offer 2 classes that does autostart SSL once the socket is
ready.
2016-11-01 01:31:56 -02:00
Gustavo Sverzut Barbieri 973f2c29b5 efl_net_socket_ssl: initial SSL wrapper.
This is the first step towards SSL connections on top of sockets, with
an example on how to upgrade a dialer and a server client using TCP.
2016-10-31 19:39:33 -02:00
Stefan Schmidt e17a8d1d9a examples: ecore: add ecore_evas_vnc example binary to .gitignore 2016-10-27 18:22:42 +02:00
Gustavo Sverzut Barbieri 9daddebf09 efl_io_copier_example: add AF_UNIX support. 2016-10-26 19:16:29 -02:00
Gustavo Sverzut Barbieri fc2b980421 addded efl_net_{socket,dialer,server}_unix
This introduces AF_UNIX server and dialer, these are not available on
Windows as in that platform we'll create a custom class for native
'local' communication.

In the future we can add a wrapper class Efl.Net.Local that will use
the class for each platform, but won't expose its details.

For instance, if we ever expose 'credentials' (which I didn't because
they are not portable), then it doesn't make sense to try to match
that on Windows. The 'Efl.Net.Local' would just stick to the basics:
Reader, Writer and Closer APIs.
2016-10-26 19:01:03 -02:00
Gustavo Sverzut Barbieri 8e47bb8e0e efl_io_copier_example: allow udp as input/source.
now that we have a 'bind', let's use the given address as bind and
dial to `0.0.0.0` or `::`. This allows the dialer to receive data at
the given address and make the example useful.
2016-10-26 12:46:09 -02:00
Gustavo Sverzut Barbieri 54de9e211f efl_net_dialer_udp_example: add missing print of groups. 2016-10-26 12:24:48 -02:00
Jean-Philippe Andre 5d04b44bbc examples: Remove now broken cxx elm examples
Bubble, thumb and separator cxx examples rely on APIs we don't
want to expose in EO, so not available in C++ either. Those
are legacy only.
2016-10-26 13:42:54 +09:00
Lauro Moura 2bd1553c8e efl_js: Update JS examples
Changing imports, functions, etc.

Also export "cast" function for all eolian_js generated classes.
2016-10-25 12:23:34 -02:00
Gustavo Sverzut Barbieri d4c6db251a efl_net_*_udp: make UDP usable, including multicast.
This was a huge work, but now UDP is usable as seen in the examples.

Instead of relying on 'connect()', just do 'sendto()' and 'recvfrom()'
as they are universal. Multicast address can only be connected in
IPv4, IPv6 wasn't working and I'm not sure the IPv4 is portable to
other platforms.

Dialer will auto-join multicast groups is the dialed address is
one. Multicast properties such as time to live (hops) and loopback can
be configured. When joining multicast groups, the local
address/interface can be configured by 'IP@IFACE' format, with
'@IFACE' being optional.

Dialers will now auto-bind, so it can receive data as dialers are
expected to be bi-directional. One can manually specify the binding
address if there is such need.

Since datagrams must be read in their full size, otherwise the
remaining bits are dropped, expose next_datagram_size_query() in both
Efl.Net.Socket.Udp and Efl.Net.Server.Udp.Client.

To finalize UDP for real we need to introduce an 'Efl_Net_Ip_Address'
structure to serve as both IPv4 and IPv6 and expose 'sendto()' and
'recvfrom()'. These will come later as this commit is already too big.
2016-10-25 10:11:48 -02:00
Gustavo Sverzut Barbieri b71a7a6a58 efl_* examples: improve usability of boolean options.
Instead of using 'bool', which requires a parameter to be useful, make
them toggle of the default value.

Adapt names to make more sense in that context.
2016-10-22 11:55:45 -02:00
Gustavo Sverzut Barbieri 38502d2df4 efl_net_*_udp: expose SO_DONTROUTE.
It's common to have protocols that are restricted to local network
only, thus allow exposing SO_DONTROUTE to avoid mistakes.
2016-10-22 11:46:19 -02:00
Gustavo Sverzut Barbieri c7fc1dce01 efl_io_copier: add inactivity_timeout.
This is handful to error the copier with ETIMEDOUT if there are no
reads or writes in the given amount of time.

Since copiers are usable to download data or handle network clients,
it's easy to set a timeout and disconnect, let's say UDP clients that
are gone.
2016-10-22 10:52:22 -02:00
Gustavo Sverzut Barbieri 787c745520 efl_net_server_udp: initial UDP server.
This is the initial UDP server that works similarly to the TCP one,
however under the hood it's widely different since the socket is
reused for all "clients", thus needs a new Efl.Net.Server.Udp.Client
(Efl.Net.Socket) as Efl.Net.Socket.Udp exposes the fd and options such
as 'cork', which would interfere in other clients.

The main socket will read the packets and find an existing client to
feed it. If no client exists, then it will create one if not overr
limit. Since there is no kernel-queuing as done by listen()/accept(),
the 'no reject' case will just accept the client anyway.

Next commits will improve UDP server handling with some advanced
features:

 - join multicast groups
 - bind to a specific interface (SO_BINDTODEVICE)
 - block packets going out of local network (SO_DONTROUTE)
 - specify priorities (SO_PRIORITY)
2016-10-21 13:33:27 -02:00
Gustavo Sverzut Barbieri dd1c574b86 efl_net_dialer_udp_example: be more 'correct' using events to read/write.
instead of blindly reading and writing, which can lead to hangs due no
server, let's use can_read and can_write to do the operations, this
won't let us believe we can read when we can't.

it's also the recommended approach, so let's show that in the examples
so users don't copy&paste incorrect stuff :-)
2016-10-21 13:33:27 -02:00
Gustavo Sverzut Barbieri 696392f5c6 efl_net_server_example: improve error messages (show text). 2016-10-21 00:16:37 -02:00
Gustavo Sverzut Barbieri 134f01671a efl_net_server_tcp: allow IPv4 over IPv6 sockets.
Sometimes we want to handle both IPv4 and IPv6 in the same socket,
instead of spawning 2 servers, one for each protocol. That is achieved
by means of disabling IPV6_V6ONLY socket option, present in most
recent platforms.
2016-10-20 18:49:41 -02:00
Gustavo Sverzut Barbieri b36e2c65f6 efl_net_dialer_udp: "connect" to an UDP server to send and receive data.
Like existing ecore_con code, this does not use SOCKSv5 UDP
proxy. It's kinda cumbersome to add since requires a keep alive TCP
connection to the server, a second UDP channel and framing around the
original UDP frame.

Added UDP_CORK (if present) to match TCP_UDP present in TCP sockets,
this allows one to execute multiple write() calls that will result in
a single datagram, generated when CORK becomes FALSE again.

The efl_io_copier_example.c now accepts this as output. There is no
input UDP as there is no way to notify the server of a connection
(since such thing doesn't exit), usually servers react after a
datagram is received, replying to the source.
2016-10-18 19:04:00 -02:00
Stefan Schmidt 1900d09300 examples: eolian_cxx: adapt code generation to changed eolian_gen commandline
The commandline options have changed for eolian_gen to generate the code. Adapt
the makefile helpers to fix the build break in examples
2016-10-14 12:38:46 +02:00
Jean-Philippe Andre 2767152140 evas: Move clip_unset to legacy, remove group_clip
Similarly to group_color_set, group_clip_[un]set should not
exist and should be a result of efl_super and inheritance.

This patch also removes clip_unset from the EO API and keeps
only clip_set(NULL). The reason is that it will avoid bad overrides
of clip_unset() vs. clip_unset(NULL). This also simplifies the code
a bit. Ideally we should be able to reintroduce clip_unset in EO
if we can have a "@final" tag (like java's final keyword), to
prevent overrides.
2016-10-12 11:25:56 +09:00
Guilherme Iscaro f8c98fe158 Eet example: Add the correct variable in the hash. 2016-10-10 14:20:48 -03:00
Subhransu Mohanty 9fc443aafe evas/vg: renamed the legacy vg shape apis
Reviewers: Hermet, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4284
2016-10-05 11:07:12 +09:00
Bruno Dilly 7dc493e68f examples/elementary: drop generated.h from SOURCES
Remove codegen_example_generated.h from codegen_example_SOURCES
and let it only on nodist_codegen_example_SOURCES and
on BUILT_SOURCES.

Also add dependency between codegen_example.c
and codegen_example_generated.h since it's required
to compile.

Avoid the following build error:
  CODEGEN      codegen_example_generated.c
  codegen_example.c:26:39: fatal error: codegen_example_generated.h:
      No such file or directory
  compilation terminated.
  Makefile:4960: recipe for target 'codegen_example.o' failed
2016-09-28 14:42:58 -03:00
Bruno Dilly 3f730b47f9 examples/ecore: add example suffix to ecore_evas_vnc
Make its name similar to all the other example
files on this folder.
2016-09-28 14:42:58 -03:00
Bruno Dilly 0eab34c68f examples/ecore: fix vnc example build
Fix missing dependency.

Get rid of the following error:

/usr/bin/ld: ecore_evas_vnc.o: undefined reference
  to symbol 'ECORE_EVENT_MOUSE_BUTTON_UP'
src/lib/ecore_input/.libs/libecore_input.so.1: error adding symbols:
  DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:2306: recipe for target 'ecore_evas_vnc' failed
2016-09-28 14:42:58 -03:00
Guilherme Iscaro 22dd89ca65 Examples: Add an Ecore Evas VNC example.
This commit adds an Ecore_Evas examples that can be used to test
the VNC multi-seat support.
2016-09-26 22:06:59 -03:00
Stefan Schmidt 1bbd108ccb examples: emotion: fix event naming after convert to EFL Canvas Object
In commit 7b90e1147442d6a8023422400bffd77e2815fe0b the event names changed
but examples have not been updated.
2016-09-22 11:43:34 +02:00
Hermet Park ed0c9fd123 edje example: fix broken batman svg resource.
correct missing '/' at the end of svg tag.
2016-09-19 23:40:14 +09:00
Gustavo Sverzut Barbieri 388ec0fb62 efl_io and efl_net examples: fix O_CLOEXEC on windows.
use the efl_io_closer_close_on_exec_set() to use a simple boolean
instead of a flag that may be undefined on some platforms, such as
windows.
2016-09-16 07:42:24 -03:00
Gustavo Sverzut Barbieri 349b106125 efl_io_closer: add close_on_exec and close_on_destructor properties.
the purpose of these properties are to make it more uniform the
handling of these auto-close behavior.
2016-09-12 13:18:28 -03:00
Stefan Schmidt c7d5d03839 examples: elementary: fix build for cxx examples needing ecore_cxx includes
The elementary cxx examples now need Ecore_Manual.hh from the cxx bindings.
Make sure we setup the include paths accordingly.
2016-09-12 10:21:47 +02:00
Cedric BAIL d959ed3686 eio: finish port to new efl_io_manager API. 2016-09-09 16:22:55 -07:00
Cedric BAIL 13b5e221ce ecore: shutup unused arguments warning. 2016-09-09 16:22:55 -07:00
Stefan Schmidt 3a794ca119 examples: elementary: ignore generated codegen example files 2016-09-08 22:51:03 +02:00
Jean-Philippe Andre 6aa5609208 evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Tom Hacohen b00564d698 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Gustavo Sverzut Barbieri 394b9411ce efl_net_dialer_websocket: EFL now does WebSocket!
The Efl.Net.Dialer.Websocket is just like other Efl.Net.Dialers: you
can dial, you can close, monitor connected/address resolved and so
on. And you can use WebSocket primitives and events such as
text_send(), binary_send(), ping() and close_request() (since
WebSockets use a close process where you should state a close
reason). See efl_net_dialer_websocket_example.c

Even if WebSocket is a message-based protocol (like "packets" from
UDP), you can use efl_net_dialer_websocket_streaming_mode_set() to
tell it to handle text or binary messages as a stream. Then all the
Efl.Io.Reader and Efl.Io.Writer APIs work as expected, see
efl_io_copier_example.c updates.
2016-09-02 00:08:50 -03:00
Jean-Philippe Andre e6f6b94ccc evas events: Fix axis input values
This adds support for distance, pressure, tilt and twist.
Not entirely sure if normalized & raw (x,y) should be exposed
in the eo interface. Also not sure what to do with tilt_x/y
(as used by libinput) or touch/tool width "major/minor" vs.
radius x/y.

Add debug logs in the example, including the distance.
I can't test most of these values due to a lack of compatible
hardware, but the most basic features seem to work :)
2016-09-01 11:57:43 +09:00
Tom Hacohen d0bc249ead Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Jean-Philippe Andre 2fc0d8ef41 evas3d examples: Add EFL_EO_API_SUPPORT where needed
I might have broken this in a previous commit in evas headers,
but the thing is that beta does not imply eo api, so both are
still required.
2016-08-26 11:44:11 +09:00
Gustavo Sverzut Barbieri cfe460c69a efl_io_queue_example: use eina_slice_endswith().
make the code more readable and clear. Also document when the line may
miss a trailing line delimiter in the slice.
2016-08-23 21:30:18 -03:00
Gustavo Sverzut Barbieri 8c23ab0685 efl_io_queue: basic class to interact with Efl.Io interfaces.
The use of low-level interfaces such as Efl.Io.Reader and
Efl.Io.Writer are not that user-friendly as they can handle partial
data.

Classes such as Efl.Io.Copier makes them easy to use, but they need a
reader (source) or writer (destination) and in our examples we used
fixed buffers or some existing streams (stdin/stdout/stderr,
networking...).

However, if interactively we need to produce some data to be sent,
such as implementing some networking protocols, we'd have to write our
own Efl.Io.Reader and Efl.Io.Writer classes to handle the buffering.

Not anymore! With Efl.Io.Queue you can write stuff to it and it will
buffer to memory. Once stuff is read, it will automatically remove
those bytes from buffer.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri 06983d8673 efl_io_copier_example: set loop as parent for Efl.Net.Dialer.Tcp
although it was working, the correct way is to set a loop provider as
Efl.Net.Dialer.Tcp object.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri c4d09a7a34 examples: add efl_io_copier_simple_example.c
a simpler example to be listed in wiki.
2016-08-23 12:05:37 -03:00
Carsten Haitzler e9a7203145 efreet - save about 240-300k or so of memory used by efreet mime
so efreet mime was loading a bunch of mime type info files, parsing
them on startup and allocating memory to store all this mime info -
globs, mimetype strings and more. all a big waste of memory as its
allocated on the heap per process where its the SAME data files loaded
every time.

so make an efreet mime cache file and a tool to create it from mime
files. mmap this file with all the hashes/strings in it so all that
data is mmaped once in memory and shared between all processes and it
is only paged in on demand - as actually read/needed so if your
process doesnt need to know about mime stuff.. it wont touch it anyway.

this saves about 240-300k or so of memory in my tests. this has not
covered the mime MAGIC files which still consume memory and are on the
heap. this is more complex so it will take more time to come up with a
nice file format for the data that is nicely mmaped etc.

@optimize
2016-08-23 12:04:06 +09:00
Gustavo Sverzut Barbieri fdad382158 fixup: http 2016-08-22 19:24:13 -03:00
Gustavo Sverzut Barbieri f33bab2648 fixup: http 2016-08-22 18:51:38 -03:00
Gustavo Sverzut Barbieri fe07b8cdab WIP: efl.net: Introduce Efl.Net.Dialer.Http
This class implements the Efl.Net.Dialer interface using libcurl to
perform HTTP requests. That means it's an Efl.Net.Dialer,
Efl.Net.Socket, Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus
being usable with Efl.Io.Copier as demonstrated in the
efl_io_copier_example.c
2016-08-22 18:25:15 -03:00
Gustavo Sverzut Barbieri b0b6757bc5 efl.net: socket, server and dialer for TCP.
Efl.Net.Server defines how to accept new connections, doing the
bind(), listen() and accept() for protocols such as TCP.

Efl.Net.Dialer defines to to reach a server.

Both are based on Efl.Net.Socket as communication interface that is
based on Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus being
usable with code such as Efl.Io.Copier.

The Server will emit an event "client,add" with the established
Socket, which is a child and can be closed by both the server or the
user.

The Dialer extends the Socket and allows for creating one given an
address, that will be resolved and connected.

TCP is the initial implementation so we an validate the
interfaces. UDP, Unix-Local and SSL will come later as derivate
classes.

The examples are documented and should cover the basic principles:

 - efl_io_copier_example can accept "tcp://IP:PORT" and will work as a
   "netcat", can send data from socket, file or stdin to a socket,
   file, stdout or stderr.

 - efl_net_server_example listens for connections and can either reply
   "Hello World!" and take some data or work as an echo-server,
   looping back all received data to the user.

More complex interactions that require a "chat" between client and
server will be covered with new classes later, such as a queue that
empties itself once data is read.
2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri d0f0bd20a0 efl.io: introduce basic interfaces and classes.
These interfaces allows generic operations on objects that can store
or provide data, such as a file or a buffer.

With well defined interfaces and events we can create code such as
Efl.Io.Copier, that will link a source with a destination and
progressively copy data as they appear.
2016-08-22 18:25:14 -03:00
Lauro Moura 4d2bcc8304 eolian_cxx: Fix behavior with explicit void return
Only perform the single value/return type substitution on properties if the
void return type is implicit (i.e. NULL return from function_return_type_get),
following the eolian-C implementation as we use the generated headers.

Also update example after Eo-Efl changes.
2016-08-17 20:54:27 -03:00
Stefan Schmidt 6b6bc48cfb examples: evas: ensure filter example lua files land in tarball
These are needed for a make doc run and have been missing the tarball before.

@fix
2016-08-17 16:43:32 +02:00
Tom Hacohen 25588b5ae3 Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen 8d31721145 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Stefan Schmidt 5dcc08f84d examples: elm: enable +evas3d_scene_on_button_example again
This was disabled at some point but works fien in my testing so enable it
again. If we no longer want it we should remove it completely.
2016-08-08 17:46:46 +02:00
Stefan Schmidt 3b3acaad57 build: examples: make sure we build all examples in list
At some point we lost the \ after track_example_01 and in combination with the
commented out line right afterwards we lost all examples coming after this line.

This just surfaced with JPs latest commit when I did a distcheck build but was
there for a longer time. We now make sure all disabled examples are moved out of
the multi-line list.
2016-08-08 17:20:50 +02:00
Jean-Philippe Andre 7b00751c16 examples: Fix button theme
A program was not handling the various states properly.
2016-08-08 20:41:51 +09:00
Jean-Philippe Andre da21656ee2 examples: Fix path to edj theme files (theme examples)
A bit complex but should work in most cases (installed & not)
2016-08-08 18:15:53 +09:00
Jean-Philippe Andre 84938cbaf1 examples: Compile edj files in elementary examples 2016-08-08 17:49:42 +09:00
jinwoo.shin 2af4b3ffca Fix memory leak issue on genlist_example_02
Summary: The realized items list should be freed by either eina_list_free() or EINA_LIST_FREE when it is no longer needed

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: minkyu

Differential Revision: https://phab.enlightenment.org/D4193
2016-07-29 11:08:09 +09:00
Stefan Schmidt 6f88f586fc examples: edje: make sure we handle the various corner cases for the po files
Delete the earlier copied files only. Handles out of tree and in tree builds.
2016-07-26 12:40:55 +02:00
Carsten Haitzler e1a1aa0b83 edje examples - when you cp also just assume success if same file
fix makefiles for examples.... more

@fix
2016-07-26 14:22:43 +09:00
Subhransu Mohanty 4f4def2776 example/edje: updated vg example with interpolation usecase
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4191
2016-07-26 14:19:59 +09:00
Subhransu Mohanty 5d0de920de example/evas: update evas vg example.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4189
2016-07-26 14:19:59 +09:00
Carsten Haitzler 077e165428 edje examples - stop deleting the po files from the src tree!
whatever someones was trying to do.. they just endewd up deleting po
files in the src tree every time you clean! argh! fix!
2016-07-26 14:04:59 +09:00
Shinwoo Kim e82f2bea6f Revert "access: add an example of elm_object_part_access_object_get"
This reverts commit f8aa67cd18e0f02368ca3aaedc159872feed459d.
2016-07-26 11:03:32 +09:00
Shinwoo Kim dca4878756 access: add an example of elm_object_part_access_object_get 2016-07-26 10:40:57 +09:00
Stefan Schmidt 1946311ed3 examples: elementary: make sure the prefs_example* files get into dist
These files have been missing from dist and thus some example builds failed.
We also need to clean them up afterwards now.
2016-07-25 18:00:42 +02:00
Stefan Schmidt 06667611bc examples: edje: fix build of edje files with translation within distcheck
The edje text example covers the translation functionality which need the mo
and po files during edje_cc compilation. Further more the folder need to be
writable to create the new mo/po files.

We need to ensure that this is the case during a distcheck which is read only
on the source tree.
2016-07-25 18:00:42 +02:00
Jean-Philippe Andre cd960b436a evas: Add a textblock to the image proxy example
This is to show that proxies can proxy more than just other
images, and also this was done to test D4159 (alternatively
changed into the previous commit).
2016-07-19 14:43:45 +09:00
Stefan Schmidt 80f1366ebe examples: edje: remove executable bit from svg files
These are plain data files, no need for an executable bit here.
2016-07-07 14:22:54 +02:00
Stefan Schmidt af240c1d7c examples: edje: make sure new svg files are packaged
In commit 0fc151cddc4cdb50661d11a124d42a9d42fa9875 these new svg files have
been added but forgotten to be made part of DATA_FILES.
2016-07-07 14:22:54 +02:00
Subhransu Mohanty dce2f75dd8 svg/example: updated svg example with gradient svg files
Reviewers: cedric, Hermet, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4139
2016-07-07 11:52:37 +09:00
Jean-Philippe Andre 631ac60a55 examples: Fix typo in filename 2016-07-04 13:45:48 +09:00
Stefan Schmidt b47f97b899 examples: update various gitignore files for new example binaries
These have been forgotten to be added recently.
2016-06-30 18:15:44 +02:00
Jean-Philippe Andre fe898ab879 evas: Add 2 EO examples for maps
Those are copy & paste & eo-ified versions of the legacy
samples. I did not touch the other legacy APIs, only maps.
2016-06-29 10:38:31 +09:00
Hermet Park 3c24d6709f edje/example: add a missing closing bracket in svg. 2016-06-25 12:37:59 +09:00
Subhransu Mohanty 3fe9e370a7 svg/example: upload the correct svg file
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4088
2016-06-24 15:16:03 +09:00
Stefan Schmidt 08e5923015 examples: emotion: make sure all callbacks are actually setup
In commit 3340745c65ef8b8361dc6eff5e746f7ce1104378 the callback array got
removed letting all callback functions around as unused. Somehow the setup
of all these callbacks have gone missing over various refactors.
2016-06-23 14:07:29 +02:00
Subhransu Mohanty 38e61dfe2c svg/example: fixed typo in svg file name
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4076
2016-06-23 17:44:37 +09:00
Stefan Schmidt eceaf0d484 examples: elementary: remove unused variable
If we are not using something we should not keep it in the code base.
Git history has it all.
2016-06-23 10:34:27 +02:00
Stefan Schmidt d8f5fe8b9e examples: rename eio_job to efl_io_manager, finish a job half done
This rename was missing in the examples. Running make examples or even a
simple grep shows this. I expect higher b0rking skills by now. :)
2016-06-23 10:32:59 +02:00
Oleksandr Shcherbina 4a4562c344 examples: evas3d: fix out of range array
Missing parenthesis have been leading to an out of bound access here.

Summary: @fix

Reviewers: stefan_schmidt

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4069
2016-06-21 17:43:34 +02:00
Stefan Schmidt 1361ad413a examples: evas: put define into config_h guards to avoid redefinition
evas-images5.c:19:0: warning: "EFL_BETA_API_SUPPORT" redefined
 #define EFL_BETA_API_SUPPORT
 ^
 In file included from evas-images5.c:14:0:
 ../../../config.h:360:0: note: this is the location of the previous definition
  #define EFL_BETA_API_SUPPORT 1

We should only define it when we are not using config.h
2016-06-21 17:07:13 +02:00
Stefan Schmidt 8c6216d7d9 examples: evas3d: uniform use of config.h include or manual defines
My recent removal of the EFL_EO_API_SUPPORT define brought some trouble to the
evas 3d examples. The problem was that there was no uniform usage of including
config.h and thus it worked fine in some constellations abut not in others. This
patch should fix the known problems and brings back EFL_EO_API_SUPPORT until we
are removing it from the whole code base.
2016-06-21 17:07:13 +02:00
Stefan Schmidt dcb514f639 examples: edje: rename new svg test file to its correct name
The code does reference a bojo.svg file so does the build system. Rename
bozo.svg to its correct name.
2016-06-21 10:58:54 +02:00
Jean-Philippe Andre 070babcaa7 edje: Fix compilation of svg example (add -beta) 2016-06-21 14:49:26 +09:00
Subhransu Mohanty 0d4216d4de edje/example: Added example for testing vector part with svg images.
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4062
2016-06-21 14:42:28 +09:00
Jean-Philippe Andre 3e3b78ce99 evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre 983e2547e0 examples: Fix misuse of evas image api on canvas 3d
image_size_set is for legacy images
2016-06-21 10:17:02 +09:00
Tom Hacohen c55d3e28ee Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Stefan Schmidt 6d2b1fd79b examples: eldbus and elementary: fix build after efl model changes
In commit 8e4f383d61188020d5ceeee691fd7df761f10202 the function signature
changed but examples have not been build and fixed.
2016-06-17 12:35:06 +02:00
Jean-Philippe Andre 4d813f6dbf examples: Fix compilation (use legacy func)
name has been removed (it's part of EO).
2016-06-17 19:32:44 +09:00
Simon Lees 73f12dfab2 examples: eina-cxx: ensure the install hook honors a set DESTDIR
Only missing from the mkdir this time.
2016-06-17 15:05:02 +09:30
Jean-Philippe Andre 855a001aa5 Evas: Rename object focus to key_focus
The evas focus concept is valid and applies only to the
keyboard inputs.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 807e41e92f Evas: Mark type as legacy and protected
Only set() is allowed for EO, and it's a constructor,
protected function. Unfortunately, this means a lot
of #define EVAS_OBJECT_PROTECTED
2016-06-17 11:37:39 +09:00
Stefan Schmidt 96fefc7b04 examples: elua: ensure the install hook honors a set DESTDIR
Reported by Simotek when testing the latest snapshot:
Were getting closer, "/usr/bin/mkdir -p /usr/share/elua/examples" should
be "/usr/bin/mkdir -p
/home/abuild/rpmbuild/BUILDROOT/efl-1.17.99.48545-1.x86_64/usr/share/elua/examples"
2016-06-16 11:16:30 +02:00
Jean-Philippe Andre 52f5e0607b examples: Use EO_CALLBACKS_ARRAY_DEFINE in all examples
Again, for Windows.
2016-06-16 13:10:35 +09:00
Luciana Magno de Almeida cd360835ea elementary-cxx: Fix compilation of some C++ examples 2016-06-15 15:50:04 -03:00
Stefan Schmidt 194965ba6a examples: evas-3d: these three examples still need EFL_EO_API_SUPPORT as well
EFL_CANVAS_RECTANGLE_CLASS is needed here which is still covered by the EO_API
define.
2016-06-15 11:29:28 +02:00
Stefan Schmidt 1c919e93a5 examples: remove now longer needed EFL_EO_API_SUPPORT define in canvas3d and vg
These examples already had the BETA flag defined so we just need to remove the
EO_API one.
2016-06-14 16:39:03 +02:00
Shinwoo Kim 6978d707d6 Ecore_Input: define data type for joysticks
Summary: This adds support for joysticks for ecore_input

Reviewers: cedric, devilhorns, Sergeant_Whitespace, raster, thiepha, zmike, jpeg

Reviewed By: thiepha, zmike, jpeg

Subscribers: thiepha, stefan_schmidt, zmike, singh.amitesh, Sergeant_Whitespace, jgerecke, cedric, seoz

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D1538
2016-06-13 20:33:29 +09:00
Stefan Schmidt 638a1d7e2e examples: elementary: ad missing math lib to linker flags
We are using cos() and sin() in the efl_thread examples here but never linked
to the math lib. Ubuntu 14.04 on Travis CI errored out with this:

/usr/bin/ld: efl_thread_1.o: undefined reference to symbol 'cos@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
2016-06-13 12:01:13 +02:00
Stefan Schmidt d528d9ab57 examples: eolian_cxx: package extra headers into dist.
Without them examples are not building from tarball distribution
2016-06-10 16:25:03 +02:00
Stefan Schmidt c1713c8be4 examples: elementary: package needed headers into dist
Without them examples are not building from tarball distribution
2016-06-10 16:25:03 +02:00
Stefan Schmidt 701f200994 examples: edje: package po/mo data files into dist
Without them examples are not building from tarball distribution.
2016-06-10 16:25:03 +02:00
Jean-Philippe Andre 1fa1f82f73 Evas: Rename Evas.Image into Efl.Canvas.Image.Internal
Make it abstract.
And add Evas.Image as a legacy-only class.
2016-06-10 13:21:20 +09:00
Jean-Philippe Andre 2dce6080c3 Evas/Edje/Elm: Use combined_min instead of min everywhere
This allows apps to set the objects min size with hint_min,
while letting the rest of EFL define the minimum size with
rstricted_min.

I don't like the property names much...
2016-06-09 16:37:49 +09:00
Stefan Schmidt 179de70189 examples: ecore: do not try to install files which are not available
The ecore_audio examples have been disabled and now do not compile right now.
But as they are disabled they never land in the tarball and thus we error out
with files not aviavle for install. Found by the OpenSUSE build service. Thanks
Simotek for reporting.

[ 2172s] /home/abuild/rpmbuild/BUILD/efl-1.17.99.47400/install-sh: ecore_audio_custom.c does not
exist.
2016-06-07 14:20:17 +02:00
Stefan Schmidt 62afb79dd5 examples: eio: update gitignore for new binaries 2016-06-07 14:20:17 +02:00
Stefan Schmidt 4b4f3ec40d examples: evas: update gitignore for new binary 2016-06-07 14:20:16 +02:00
Stefan Schmidt 0b4d69ccad examples: eio: remove unused variable 2016-06-06 15:43:15 +02:00
Stefan Schmidt 30fade6838 examples: eio: mark unused parameter as such
Really shutting up warnings here to see what else the compiler has to say.
2016-06-06 15:43:15 +02:00
Felipe Magno de Almeida e3081e2e50 eolian-cxx: Rewrite to accomodate new features of the C++ binding 2016-06-06 02:54:36 -03:00
Larry Jr 51f1fb705a eio: Add mime_type property in Eio_Model 2016-06-05 22:08:06 -03:00
Felipe Magno de Almeida ef9436d86e eina: Remove Eina_Promise* parameter to callbacks to promises in examples 2016-06-03 20:03:13 -03:00
Felipe Magno de Almeida 2107af0fc1 eolian-cxx: Fix C++ example compilation 2016-06-03 17:22:18 -03:00
Felipe Magno de Almeida 26186410a3 eina: Fix examples using new Eina_Promise semantics 2016-06-03 17:22:18 -03:00
Jaehwan Kim 1afb0c8050 examples: elementary: fix the wrong spell in comment. 2016-06-03 10:34:25 +09:00
Jean-Philippe Andre 1c067e4430 Evas: Rename Evas.Rectangle as Efl.Canvas.Rectangle 2016-06-02 18:57:30 +09:00
Tom Hacohen 250be1e27a Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba788ec834c5608361c0834853f2d5d7.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Subhransu Mohanty 712af11641 evas: updated evas_vg_sample with the appen_arc() api as well as _shape_dup() api test.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-05-31 14:59:26 -07:00
Lauro Moura 6d7b331448 eio: Adds Eo-based Eio API
The legacy Eio_File factory functions are replaced by an Eo object
called Eo_Job that return promises wrapping the async file operations.
With this commit, the legacy Eio callbacks are replaced by the following
Eo/Promises counterparts :

* Done_Cb -> Promise then success callback
* Error_Cb -> Promise then error callback
* Main_Cb -> Promise progress callback
* Filter_Cb -> Job object event (more below)

Events are used to deliver and get the filter data. To differentiate
between the named and direct versions, they come in "filter,direct" and
"filter,name" versions.

Monitors were wrapped inside a new class Eo_Sentry.

The user creates a sentry object and adds monitoring targets to it,
listening to events on it.

The sentry event info is composed of two strings. The source string
is the path being monitored, i.e. the one passed to eio_sentry_add, and
the trigger string is the path that actually triggered the event, e.g.
a new file created in a monitored directory.
2016-05-25 21:32:03 -03:00
Stefan Schmidt 126d2b6e99 examples: emotion: adapt to name change from obj to object
In commit 75a53ece1007d927b8f0b6c5d3f269726afb9108 obj was changed to object.
As one can claerly see though make examples have not been run to verify this
change. Catch up in examples with this rename.
2016-05-19 09:19:06 +02:00
Felipe Magno de Almeida acbc6dd529 js fixes 2016-05-18 17:52:47 +02:00
Cedric Bail 6fc198c95a eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Stefan Schmidt d6222ea369 examples: elementary: remove unused variable 2016-05-18 12:31:52 +02:00
Stefan Schmidt 9235c4cb1a examples: evas: remove unused variable
pi is never used here. Actually for such cases we should use M_PI anyway.
2016-05-18 12:29:06 +02:00
Stefan Schmidt bfcfa6a38d examples: evas: build evas-3d-fog example
So far this file has only been in our tree but the example has not been build.
2016-05-18 12:17:16 +02:00
Stefan Schmidt 02e20a063e examples: ecore: add all needed files to SOURCES to make sure they are distributed
This worked in-tree but never landed in a distribution tarball and thus the
examples build form such a tarball would fail.
2016-05-18 12:17:16 +02:00
Stefan Schmidt b7a3ec82fe examples: evas: add all needed files to SOURCES to make sure they are distributed
This worked in-tree but never landed in a distribution tarball and thus the
examples build form such a tarball would fail.
2016-05-18 12:17:16 +02:00
Tom Hacohen 1aee2b602a Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Cedric Bail 7af402719a Revert "autotools: fix lots of warning."
This reverts commit 885d6c7d9bb0c253c49fd3f6351dd06d28a4cf74.

Reverting all as it seems those warning where actually for working code...
2016-05-16 09:29:29 -07:00
Cedric Bail 1073b4a887 autotools: fix lots of warning.
Thankcs Jean Guyomarc'h.
2016-05-16 09:09:23 -07:00
Stefan Schmidt 83e336e0f4 examples: eolian_cxx: fix some problems after changing the colourable namespace
Fix commit 3e8db298f70932ce7b2f5296d44b262a615ea87c the namepsace changed but
only a few files have  been fixed for this. Many files did still not compile
with make examples. I fixed some more but stopped at the cxx files with the hope
that the original author would actually do this.
2016-05-10 11:10:24 +02:00
Stefan Schmidt ef4a4bc0f6 examples: evas-3d: fix executable name for evas 3d fog example
This list contains the executable names and not the source file names.
2016-05-10 10:00:42 +02:00
Cedric BAIL 6d84d5f97f efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Felipe Magno de Almeida 5893c8635c elementary: Fix example compilation when compiling in another directory 2016-05-08 12:20:27 -03:00
Felipe Magno de Almeida 47afc12f78 eolian-cxx: Disable example and fix new naming standard
Fixed naming standard in some tests and disabled the callback test
while Ecore Eo API is still rapidly changing
2016-05-08 12:19:48 -03:00
Felipe Magno de Almeida 19bbc79829 evas: Disabled C++ example while Eo API is still rapidly changing 2016-05-08 12:02:39 -03:00
Cedric BAIL 0b03f2d093 elementary: make clean, clean edj correctly. 2016-05-05 14:55:52 -07:00
Cedric BAIL 5cdfbc364b elementary: add resulting edj to allow make dist to work on a clean directory.
Due to dependencies from elementary codegen on the edj files triggered by the
generation of .h and .c, we actually need to provide the edj as it would
otherwise to build edje_cc prior to any make dist.

As the edje file was added after in the git repository, you may have some
timestamp issue to fix before doing a make dist. Try touch on all codegen_example
files.

T3588
2016-05-05 14:54:53 -07:00
Larry Jr b37ad2b589 Efl, Eio, Eldbus, Elementary: new model API use eina_promise
Efl - efl_model_base changed to use eina_promise
Eio - eio_model use efl_model_base with promise
Eldbus - elddbus models use promise now
Elementary - elm_view_list and elm_view_form use new models with promise

updated all related examples and tests
2016-04-29 13:21:24 -03:00
Carsten Haitzler 5ec412c4bd efreetd - reduce memory usage by using stringshare much more
lots of long paths for monitoring file paths for icons etc. are in
memory for efreetd. this reduces that memory by sharing them much more.

@optimization
2016-04-23 23:07:48 +09:00
Cedric BAIL 2569ba7b7a elementary: actually this is part of our make dist and shouldn't be build everytime. 2016-04-21 16:58:15 -07:00
Felipe Magno de Almeida 1de3d58ae3 eolian-cxx: Remove deprecated examples
Removed deprecated and non-compilable examples for C++ using
Evas. Users should look into C++ Elementary's examples instead.
2016-04-21 15:25:24 -03:00
Jean-Philippe Andre cc413235d0 Examples: Fix compilation (disable CXX examples!)
Warning: This disables CXX examples because they use
now-internal APIs that have no EO API binding.
Those examples should be updated to use Efl.Ui widgets... once
we have them.
2016-04-21 17:16:53 +09:00
Oleksandr Shcherbina 4b8bfe543e evas: update evas-3d-shadow example
Summary: Add possibility turn on/off rendering scene with/without post processing

Reviewers: cedric, raster, Hermet

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-15 11:20:14 -07:00
Cedric BAIL 9dfb570be9 examples: add DESTDIR support for install. 2016-04-14 17:00:08 -07:00
Oleksandr Shcherbina efe419f31c evas.canvas3d: Change shade_mode to shader_mode
Summary:
enum Evas.Canvas3D.Shade_Mode are using for choose relevant shader source code.
So renaming have a sence.
Rename evas_canvas3d_shade_mode_set/get property to evas_canvas3d_shader_mode_set/get
Rename internal fields and functions

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3882
2016-04-14 20:28:20 +09:00
Amitesh Singh 9686393885 example: eina log - set eina log levels in examples 2016-04-13 15:29:29 +05:30
Tom Hacohen 8a66cff035 Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Carsten Haitzler 046bd1c536 evas gl - fix leak with font glyph textures
some font glyphs are still allocated after tyhe last gl window is
freed which means we can't make current anymore to free textures after
that. this fixes that by flushing gl texture info from the font cache
when the last gl windows are gone.

@fix
2016-04-12 12:47:30 +09:00
Cedric BAIL 56139dd32e elementary: we actually need to include this generated files or make dist will fail. 2016-04-11 11:26:06 -07:00
Stefan Schmidt 96b2096876 build: make sure generated files in examples get cleaned up
Distcheck pointed these out as not being cleaned up and it was right. Make sure
we handle these generated files during cleanup.
2016-04-11 14:18:17 +02:00
Cedric Bail 7416fe7e9d elementary: fix dependencies to build clean examples. 2016-04-10 12:04:29 -07:00
Cedric BAIL c3758534e6 elementary: restore examples build. 2016-04-08 16:01:07 -07:00
Cedric BAIL df81e2ddef evas: don't track some forgotten example 2016-04-08 16:01:07 -07:00
Cedric BAIL 447a746a67 elua: unbreak make install-examples 2016-04-08 16:01:07 -07:00
Yeshwanth Reddivari eaa5e65d48 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
Daniel Zaoui 97806b0a3f Examples: remind Tom to compile before pushing
He will spank me for the commit message!!!
2016-03-29 09:49:52 +03:00
Jean-Philippe Andre 0a2d68c288 examples: Fix evas_canvas3d_proxy (temporary solution)
It was broken after all the changes in Evas.Image.
Since buffer map/unmap is not fully completed (GL support is
still to do), I added a quick #ifdef to switch between EO and
Legacy APIs.

Thanks @jackdanielz for the report.
2016-03-29 15:19:55 +09:00
Tom Hacohen 00e0cee670 Merge Elementary into the EFL
Some things may still be broken, but Cedric will progressively fix
things as they pop. Default configuration works as expected.
2016-03-24 18:50:47 +00:00
Cedric BAIL 83ad67f514 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00
Stefan Schmidt b97fb616cb examples: adjust include path for headers no longer public headers
Since commit a4f0f08399de85b382603bc57e7a480872e85915 these header files are
no longer installed. Make sure the example have the correct path to actually
find teh files. If we no longer consider them public we might want to think
about removing the examples for them.

This commit fixes the examples build only.
2016-03-23 15:34:54 +01:00
Stefan Schmidt 319ab3be61 examples: mark unused argument to avoid warning 2016-03-23 15:34:54 +01:00
Oleksandr Shcherbina f802f50a95 evas.canvas3d: fix wrong output in evas-3d-pick example
Summary:
Since that
https://git.enlightenment.org/core/efl.git/commit/?id=c850cc0d80b754be851576083eba27a72b58b9f2
we don't use scene object for recalculation pick coordinates.
@fix

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-18 11:55:07 -07:00
Jean-Philippe Andre c109f6d22e Efl.Gfx.Fill: Rename filled to fill_auto
fill_filled is a strange name for the property.
fill_auto seems to make more sense. If you disagree, scream at
me or revert this commit.
2016-03-18 13:28:45 +09:00
Oleksandr Shcherbina ce17f39669 evas.canvas3d: example using static LOD
Summary:
Example using static LOD in evas.canvas3d
It should be applied after D3731

Reviewers: Hermet, raster, cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-17 11:53:26 -07:00
Jean-Philippe Andre cd10b5093f Evas.Image: Create Efl.Canvas.Image for file & data images
This replaces standard Evas_Object_Image when it is used "normally",
ie. it's an image from a file or from a pixel buffer. All other APIs
(proxy, snapshot, 3d, gl, ...) are disabled on this object.

Also, reduce number of failing calls when the object is not a legacy
object, but a legacy function is called. This is because a lot of
image APIs are called internally using the legacy APIs, often in
order to reset the state of the image object (eg. set file to NULL,
etc...)
2016-03-17 13:10:35 +09:00
Tom Hacohen 6b4d54df87 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00:00
Jean-Philippe Andre 29b645ea26 Examples: Update evas object eo example 2016-03-15 11:11:59 +09:00
Jean-Philippe Andre c01a10c331 Evas: Move 3d to Efl.Canvas.Scene3d
This still seems a bit redondant with the underlying
Evas.Canvas3d.Scene class.
2016-03-15 11:11:59 +09:00
Tom Hacohen fdb1a24ea0 Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757b6332306264d7f126b15ba7bfd37d4.
2016-03-11 12:29:03 +00:00
Tom Hacohen d83c540ada Revert "Examples: Update according to recent eo_add changes."
This reverts commit 6594ba0b6df9ba72f031a00d0e8ba3b23cf2c0b2.
2016-03-11 12:29:03 +00:00
Tom Hacohen daa9ef817c Revert "Fix examples according to the recent eo event changes."
This reverts commit d2fba6c5959f82f35984167131d3b67207780f48.
2016-03-11 12:29:03 +00:00
Stefan Schmidt 26c16d8c0b examples gitignore: adding four new examples to their .gitignore files 2016-03-09 23:13:38 +01:00
Tom Hacohen 148e6d13e8 Fix examples according to the recent eo event changes. 2016-03-09 17:16:19 +00:00
Tom Hacohen fb11959f82 Examples: Update according to recent eo_add changes. 2016-03-09 17:02:45 +00:00
Tom Hacohen 6a210da20c Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Stefan Schmidt 0dcde7d3ea evas-3d examples: remove unused variables 2016-03-08 11:06:29 +01:00
Vitor Sousa f93800fa31 eolian-cxx: Fix Eolian C++ constructing methods with new eo_add
Also fix Eolian C++ examples using the new "eo_super".
2016-03-03 16:05:40 -03:00
Tom Hacohen d10f030d2c Examples: Remove eo examples.
Those were always bad, inaccurate and outdated, and are not really needed
because you should be using Eolian, and not Eo directly.
2016-03-03 09:58:08 +00:00
Tom Hacohen bf73a1b51f Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +00:00
Tom Hacohen 9cdd16035a Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 4350f85b02 Manually semi-migrate files in preparation for the script
The migration scripts breaks with some weird cases, here I manually
migrated some parts, and just removed the eo_do from others without
actually migrating (so I could deal with that later).
2016-03-03 09:56:20 +00:00
Tom Hacohen b2b3667513 Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Stefan Schmidt 6a3ab142b8 evas: follow file rename to keep distcheck working
In 8b00eb1dd1241290025e041973f6c8748b3e8fe4 the file was moved but the rename
forgotten in the Makefile.
2016-01-14 11:32:54 +01:00
Jean-Philippe Andre d3acbe4f19 Evas 3d example: Print message for usage 2016-01-14 12:18:53 +09:00
perepelits.m ad374bd738 Evas: fix example for convex hull
Summary: Made new models with no normal component to print
сorrect print message for testing not only by visual result.

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3562
2016-01-14 12:08:33 +09:00
Jean-Philippe Andre c7c02a4bfc Examples: Fix compilation of elocation ex (out of tree) 2016-01-14 11:38:27 +09:00
Srivardhan Hebbar ed1954e6bb emile: Added example program for base64 encoding and decoding.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3554
2016-01-14 11:28:40 +09:00
Oleksandr Shcherbina 8795600c71 evas: fix resource file for billboard in evas-3d-shadow example
Summary: Due to evas.canvas3d shader flips resource image.

Reviewers: cedric, Hermet

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-12 14:05:34 -08:00
Srivardhan Hebbar 99601567bc eina: removing base64 from eina example.
Summary:
As base64 API's are no longer part of eina, removing them. Will add
separate file for emile examples.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3552
2016-01-09 00:33:44 +01:00
Srivardhan Hebbar 9d94188a23 eina: update example for with eina_base64url_decode function.
Summary:
Depends on D3521

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 15:42:59 -08:00
Srivardhan Hebbar 7078fcb835 eina: update example with eina_strbuf_manage_read_only_new_length function.
Summary:
The example is to demonstrate the use of
eina_strbuf_manage_read_only_new_length API.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: jpeg, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 12:32:18 -08:00
perepelits.m 9e117866b8 evas: fix ply example after adding of new savers and loaders.
Summary:
Before adding of new saver and loader for ply format we had a chance to set EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR
for every mesh, now we save only existing atributes and there are a lot of meshes we have to set EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR.

[FIX]

Reviewers: cedric, raster, Hermet

Subscribers: jpeg, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-01-04 12:31:23 -08:00
Srivardhan Hebbar f4a4fed258 eina: Updated example program to demonstrate base64url encode.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D3483
2015-12-31 13:34:19 +09:00
Shinwoo Kim bea1243e98 edje example: change wrong comment, and remove warning message by adding ellipsis
Summary: Enhance edje color class example

Test Plan: build using the comment message

Reviewers: raster, cedric, jpeg

Reviewed By: jpeg

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3508
2015-12-31 12:37:49 +09:00
Jean-Philippe Andre aac53d3782 Evas examples: Fix examples data dir for out-of-tree builds
This is a quick fix to make out-of-tree builds of the examples
work fine. Don't pass "." as teh resource dir root, instead
pass the path to the source files' folder.
2015-12-18 16:48:34 +09:00
perepelits.m 13f9d38f13 Evas 3d: Add example for convex hull
Summary: This example is a testing example for comparison convex
hulls built by our algorithm and in Blender.

Reviewers: raster, Hermet, cedric, jpeg, perepelits.m

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3336
2015-12-18 16:48:15 +09:00
Jean-Philippe Andre 3abf0425de Examples: Remove strange characters at beginning of file 2015-12-15 15:05:06 +09:00
Vincent Torri 64371bd42f Examples, Evas: remove MAX_PATH, which is already defined on Windows, and not used in this example
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3442
2015-12-15 15:05:06 +09:00
Vincent Torri 81244e1785 Example, Ecore: fix compilation on Windows
Summary:
The socket API is different on Windows and on Linux.

This is the perfect example where we need to abstract the socket API in Eina :
1) to avoid all these includes specific to sockets
2) to avoid on Windows undefined behavior : close(socket); is undefined behavior if socket is indeed a socket

Reviewers: jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D3441
2015-12-15 15:05:06 +09:00
Vincent Torri bc8ebb31c0 Examples Evas: 'far' and 'near' are Windows keywords, so rename them to far_ and near_
Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3440
2015-12-15 15:05:06 +09:00
Vincent Torri 84fc3b636e Examples: Fix compilation on Windows for eina, eio, elocation and eolian_cxx
Summary:
When compiling on Windows, Evil.h must be included, so update Makefile.am
accordinglY

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3439
2015-12-15 15:05:06 +09:00
Larry 6c05bea472 eldbus: add eldbus.model examples
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-10 12:02:30 -08:00
Guilherme Lepsch bccc6c8864 eldbus: add efl.model implementation.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-10 12:02:30 -08:00
Srivardhan Hebbar e1442b98fd eina: Adding example for base64 decode function.
Summary:
Depends on D3381

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

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

PS: arc patch failed so manually applying this patch
2015-12-07 19:29:36 +09:00
Vincent Torri d032abcdd4 efl: add binary mode to open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:06:04 +01:00
Vincent Torri dad8627da8 efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:04:36 +01:00
Subhransu Mohanty cd31e7e9bd efl: change efl_gfx_shape_cubic_to() api signature to follow other API (cairo and freetype).
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-30 15:59:49 -08:00
Stefan Schmidt f5f5b56404 examples ecore_buffer: correct argument order for calloc()
calloc() expects count first and the actual size to allocate as second
argument. Say Thank You to smatch for finding this issues for us.
2015-11-30 16:31:58 +01:00
JinsolPark 92f8f75830 eolian: fix eo makefile example of --eo option.
Summary: eolian: fix eo makefile example of --eo option.

Reviewers: cedric, q66

Reviewed By: q66

Subscribers: jpeg, q66

Differential Revision: https://phab.enlightenment.org/D3389
2015-11-30 10:37:10 +00:00
Daniel Hirt f81fc8b263 Edje: Add example for hyphenation style
A small example how hyphenation is set as a style in TEXTBLOCK parts.
2015-11-24 14:31:29 +02:00
Srivardhan Hebbar 3b5da62920 eina: example for base64 encoding.
Summary:
Depends on D3228

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-22 23:28:09 +01:00
Jean-Philippe Andre c347fd4621 Ector: Simplify confusing code
The base class data was already stored, no need to figure it out again
2015-11-20 14:14:28 +09:00
Cedric BAIL 9606ceccd9 eolian: fix build after removal of --eo option. 2015-11-17 05:39:09 +01:00
Srivardhan Hebbar 752be6184d eina: updated example to include eina_strbuf_substr_get.
Summary:
Depends on D3224

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 15:04:24 -08:00
Srivardhan Hebbar d60eda3e82 ecore_con: updating example with ecore_con_url_status_code_get function.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:21:02 -08:00
Shilpa Singh bae1e11bb8 eina: add API eina_strftime
Summary:
Add new API eina_strftime API in eina_str

@feature

Test Plan: test case and example also updated

Reviewers: tasn, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 12:42:50 -08:00
Shilpa Singh 50140c4a0c eina: add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs
Summary:
Add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs, these APIs create new tmpstr but reuse the input string memory.

@feature

Test Plan: Test case and example updated

Reviewers: tasn, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Srivardhan Hebbar df41dad6ea eina: updated example to add eina_strbuf_tolower.
Summary:
Depends on D3200
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Srivardhan Hebbar 56f81aba8b ecore_con: preventing possible NULL pointer dereference.
Summary:
Checking if client is NULL before freeing is not of much use. If it is NULL, it would have crashed before when it was dereferenced in printf. So checking NULL before dereferencing.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
Stefan Schmidt 8da0b707d1 examples: fix eina_tmpstr example after revert of strftime
Was left broken after the eina_tmpstr_strftime revert.
2015-10-04 09:19:53 +02:00
Tom Hacohen fd9bb7dd30 Eo: Fix examples and benchmarks according to recent Eo changes. 2015-09-28 16:18:09 +01:00
Tom Hacohen e5c1c78924 Eo: Remove EO_SENTINEL.
This was never really needed because we always had the count.
Removing this now because we are already breaking API and ABI.
2015-09-28 15:52:50 +01:00
Tom Hacohen b8a7ecc930 Eo: Drop doc field from ops and events.
This hasn't been used for a while. Since we are going to break Eo a bit anyway
it's a good opportunity to drop this.

This may cause a slight performance issues with legacy events, such as
smart callbacks. This shouldn't really be a problem as we've migrated away from
them. If it does, we need to migrate the remaining parts. Only relevant
for callbacks that are added before the classes are created, which
shouldn't be possible except for smart, only for old evas callbacks.
2015-09-28 15:09:16 +01:00
Shilpa Singh 06e4ef25ab eina: add example for eina_tmpstr.
Summary:
Example for eina_tmpstr added.

Example tests for eina_tmpstr_add_length, eina_tmpstr_len, eina_tmpstr_del and eina_tmpstr_strftime APIs

Signed-Off By: Shilpa Singh <shilpa.singh@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 14:27:56 -07:00
Srivardhan Hebbar f8d5339532 ecore_example: fix file name in the example's comment.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 12:43:23 -07:00
Srivardhan Hebbar c24540a8e4 ecore_con: preventing possible NULL pointer dereference.
Summary:
Checking if client is NULL before freeing is not of much use. If it is NULL, it would have crashed before when it was dereferenced in printf. So checking NULL before dereferencing.
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-09-23 12:42:22 -07:00
Cedric BAIL 7fc89ccfe1 evas: node that are used for a fill should not have a parent or they are going to be drawn.
@fix example for Efl VG.
2015-09-21 22:50:34 +02:00
Yeshwanth Reddivari d5b2e7e387 Edje Example: Fix wrong usage of evas_object_color_set API
Summary:
Evas only handles pre multiplied colors. So use r,g,b values lesser than alpha to prevent error message.

Signed-off-by: Yeshwanth Reddivari <r.yeshwanth@samsung.com>

Reviewers: sachin.dev, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3073
2015-09-19 08:38:39 +05:30
David Walter Seikel 99a497aa33 ecore - let the ecore_con_eet_*.c examples build.
When using the --enable-always-build-examples configure option, these two
examples need to be linked to eet.

@fix
2015-09-11 14:19:36 +10:00
Srivardhan Hebbar 232352cb32 eet_example: Fixing memory leak.
Summary:
calloc is done 2times, so there is a memory leak. So fixing that.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3032
2015-09-08 10:23:42 +02:00
Stefan Schmidt 336c874fdc evas examples: avoid shadowing a global variable in a function 2015-09-07 15:52:35 +02:00
Srivardhan Hebbar 8788cf72a3 ecore_example: Fixing NULL deference.
Summary:
pd was dereferenced and then checked for NULL. If it was NULL, the program would crash much before. So fixed that.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3031
2015-09-07 13:30:48 +02:00
Srivardhan Hebbar 36a7f59c80 ecore_example: Fixing memory leak.
Summary:
Fixed a memory leak in this example.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3010
2015-09-07 11:36:18 +02:00
Srivardhan Hebbar 198b314fa8 ecore_example: Fixing NULL dereference.
Summary:
cd was dereferenced and then was checked for NULL. If cd is NULL, it would crash before itself. So checking for NULL before dereferencing cd.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3009
2015-09-07 11:13:48 +02:00
Srivardhan Hebbar bd66cdf989 ecore_example: Cleanup of ecore_compose_get_example.c
Summary:
Relating to D3010. This patch is code cleanup. Have done dos2unix. After this will update D3010 bug.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3025
2015-09-07 11:00:20 +02:00
Cedric BAIL 0a3d6daf60 evas: improve simple VG example to interpolate a full VG tree. 2015-08-21 16:40:31 +02:00
Jihoon Kim 7103ddbfe7 ecore_imf_example: remove unnecessary code to set client window 2015-08-20 16:11:24 +09:00
Yomi 10caab32dd Fix grammar in error messages.
Summary:
Changes:

     src/examples/eio/eio_file_copy.c
     src/tests/eio/eio_test_file.c
     src/tests/eio/eio_test_xattr.c

Reviewers: cedric, thiepha, Hermet

Reviewed By: thiepha, Hermet

Subscribers: thiepha, cedric

Differential Revision: https://phab.enlightenment.org/D2912
2015-08-07 17:06:23 +09:00
Oleksandr Shcherbina 09e31cf323 Evas canvas3d: Move evas 3d types to evas_types.eot
Summary:
Move evas_canvas3d types from Evas_Eo.h to evas_types.eot
Change enum constatnt for vertex_arrtib, material_attrib, blend_func
Correct namespace for Evas.Real type

Reviewers: cedric, tasn

Reviewed By: tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2734
2015-08-04 10:57:14 +01:00
Yomi 1e0622fe6e eio: grammar and typo fixes in docs.
Summary:
Fix a sentence.

Changes:

     src/examples/eio/eio_file_ls.c

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2894
2015-08-03 11:59:03 +02:00
Stefan Schmidt 5fcd0e8c27 examples: Update .gitignore for binaries 2015-07-28 08:32:47 +02:00
Ivan Furs ba92c984ed evas canvas3d: bounding box does not change the position according object
Summary:
This fix need for synchronous rotation mesh and aabb of  "sonic" in example "evas-3d-aabb.c".
@fix

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: sri.hebbar, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-07-28 03:05:37 +02:00
Stefan Schmidt 702fd8afaf examples/emotion: Remove unused callback functions from generic example 2015-07-23 17:19:24 +02:00
Stefan Schmidt fe8f57ae16 examples/ecore_con: Mark some unused parameters as such 2015-07-23 17:18:04 +02:00
Stefan Schmidt 0dbd8fcd18 examples/evas/shooter: Move image path into file that uses them.
The evas-3d-shooter-header.h is used by two binaries. One is using these image
path and the other not. Which means that we get a bunch of warnings thrown at
us during the compile of the binary which does not use them as unused variables.
Solve this by having them only in the place where they are actually used.
2015-07-23 17:11:23 +02:00
Stefan Schmidt 26f1b4d3e2 examples/evas/shooter: Add double include guards to header file. 2015-07-23 17:03:27 +02:00
Stefan Schmidt 986ac301f4 examples/evas/shooter: Remove more unused variables. 2015-07-23 16:48:21 +02:00
Stefan Schmidt a89b8bb8d1 examples/evas/shooter: Remove unused variable
The column.ply does not even exist. Might have been removed and this part
forgotten.
2015-07-23 16:45:06 +02:00
Jihoon Kim 16589c4ea4 example: check NULL value in ecore imf example 2015-07-14 16:15:35 +09:00
Daniel Hirt 2a1b631d55 Evas Textblock: Add obstacle objects feature
Summary:
Introducing a new feature for Evas Textblock. This allows the layout to
wrap around other evas objects.
The following API is added:
 - obstacle_add
 - obstacle_del
 - obstacle_update
Evas objects can now serve as textblock obstacles, if positioned and
visible on the text area. The text will wrap around the obstacles
according to the wrapping mode set to it.

This also modifies the current wrapping code to handle obstacle wrap
points as well. The wrap index query function is modified so that
forward-scanning (specific cases) may be disabled when treating
obstacle wrap point.

RTL text is currently unsupported by this feature.
Consult added docs and example for usage.

@feature

Test Plan: Evas example and test in evas_suite are provided with this.

Reviewers: tasn

Subscribers: raster, JackDanielZ, cedric

Differential Revision: https://phab.enlightenment.org/D2405
2015-07-01 16:24:31 +01:00
Jean-Philippe Andre c31b75d20e doc: Fixup EDC documentation about filters & examples 2015-06-30 10:12:13 +09:00
perepelits.m 04d19b80c7 evas: fix shooter example
Summary: Disable atlas flag for all objects, fix motion algorithm, add primitives.

Reviewers: Hermet, raster, cedric

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-25 17:21:09 +02:00
Vitor Sousa 7537760c8d eolian_cxx: Use C++ wrappers instead of native types as parameters
Summary:
Using C++ wrapper types in the signature of methods of the generated
classes.
Now, when the type is an Eo type defined in Eolian, eolian_cxx will detect
it and use the equivalent C++ wrapper.

Types defined in Eolian no longer need to be specified in the lookup table,
so removed them from there.

Disable wrapping of non-const char*. The current wrapper (unique_ptr) is
not suited for some required operations like ownership acquisition from
C code.

Fix constructing properties that only have the "set" method.

Fix translation of non-const parameters.

Modified Makefiles to allow proper inclusion of evas_cxx headers required
by some tests and examples.

Move one auxiliary function to another reader to make it more accessible.

@feature

Reviewers: felipealmeida, q66, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2752
2015-06-24 15:23:01 +01:00
Stefan Schmidt 07f650a81c examples: Fix build after ecore_buffer commit.
Since 8b621775619b9959fe952b095b3baaa7aaa99572 make examples fails to build
as the examples have been included without checking if ecore_buffer is
actually enabled to build.

make[2]: *** No rule to make target '../../../src/lib/ecore_buffer/libecore_buffer.la', needed by 'ecore_buffer_example'.  Stop.

I'm running make examples during the nightlies now in the hope to catch those.
2015-06-24 13:46:43 +02:00
Seunghun Lee dd7ef2dbc5 ecore-buffer: Add ecore_buffer library to EFL.
Summary:
Ecore_Buffer is abstraction of graphic buffer.
it supports backend of shm, x11_dri2 and x11_dri3 for now,
and this library also provides method to share buffers between processes.
Ecore_Buffer_Provider and Ecore_Buffer_Consumer is for this, sharing buffer.
provider draws something in to Ecore_Buffer, and consumer receives and displays it.
the binary, bq_mgr is a connection maker for buffer provider and consumer.
it can be included Enlightenment as a deamon later.

@feature

Test Plan:
1. Configure with --enable-ecore-buffer and --enable-always-build-examples to build examples.
2. Run bq_mgr, it connects consumer and provider.
3. Run ecore_buffer_provider_example and ecore_buffer_consumer_example

Reviewers: lsj119, gwanglim, cedric, zmike, jpeg, raster, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2197
2015-06-22 10:31:42 -04:00
ChunEon Park acf868771c eina: add eina_simple_xml example.
This example just prints tag and it's attributes in xml file.
But this example intended for the scenario,
if the attributes have the "<" or" >" characters inside of the string.
2015-06-18 19:50:00 +09:00
Daniel Zaoui 222bb326ff Examples: Fix emotion basic example 2015-06-18 05:42:14 +03:00
Daniel Zaoui 8c4c825e4d Examples: fix compilation due to inline
Undefined references were occurring on inline (not static) functions.
Adding static to these functions solves the issue.
2015-06-18 05:32:39 +03:00
Oleksandr Shcherbina 87382a2dad evas: change interface evas_3d to evas_canvas3d
Summary:
Regard to https://phab.enlightenment.org/T2479 it is need for right generation
Eolian files

Reviewers: cedric

Subscribers: cedric, tasn

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-17 17:52:17 +02:00
Ivan Furs 090173037e evas_canvas3d: cube chaotic was not initialized and relied on luck to be zeroed by default.
Summary: Cube chaotic was rotated, because angle in structure of "SceneData" have random number.

Reviewers: cedric, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-17 17:49:04 +02:00
katpavalli b6a80dea32 edje: add po file support in edc translation.
Summary:
   Implementation to support .po files in edc for translation

Test Plan:
   Test Code to test this implementation is done as part of efl/src/examples/edje/edje-text.c and efl/src/examples/edje/text.edc
   edje_cc -md . text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore eo`
   ./edje-text

   1) Click On the text "Click here"
      The language gets changed.

Reviewers: shilpasingh, cedric

Reviewed By: shilpasingh, cedric

Subscribers: cedric, rajeshps, govi, poornima.srinivasan

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-11 10:40:55 +02:00
Avi Levin 765cd4801c emotion: porting evas smart callbacks to eo 2015-06-07 11:00:52 +03:00
Daniel Kolesa 91f3ad2865 eo: move some eo files to new doc syntax 2015-06-05 17:03:36 +01:00
katpavalli c3804bfc45 edje: add ability to change the language on one specific edje object.
Summary:
   Add a new property to edje_object.eo for setting the language on one Edje_Object.

Test Plan:
Test Code to test this implementation is done as part of efl/src/examples/edje/edje-text.c and efl/src/examples/edje/text.edc
   edje_cc -md <dir path>/efl/src/examples/edje/ text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore eo`
   ./edje-text

   1) Click On the text "Click here"
      The language gets changed as per the specific edje object.

   2) Click on the text object at bottom. "Click here"
      The system language gets changed and the below two edje objects language are changed globally.

Reviewers: cedric, shilpasingh

Subscribers: poornima.srinivasan, govi, rajeshps, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-01 17:50:02 +02:00
Bogdan Devichev 405aa452ae evas: Evas_3D examples use new API for creating primitives.
Summary: Examples changed due to D2516

Reviewers: Oleksander, Hermet, raster, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-29 18:22:09 +02:00
Daniel Kolesa 25b630ac35 gitignore++ 2015-05-29 16:48:32 +01:00
Tom Hacohen ae79cbf48b Eo base: Remove the free_func parameter from key_data_set.
This was not really useful and against the Eolian guidelines.
While I promised I won't break things until the 27th, I was ill
(still am), so I'm giving myself a 1 day pass. :P
2015-05-28 17:47:59 +01:00
Tom Hacohen bb7f73a5c7 Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object
being worked on, or NULL (if the constructor failed). This can also
be used for implementing singletons, by just always returning the same
object from the constructor.

This is one of the final steps towards stabilizing Eo.

@feature
2015-05-20 13:03:24 +01:00
kumar navneet 54da834426 edje: add cubic bezier transition example.
Summary:
Example was missing for cubic bezier transition, hence added the same.
Signed-Off By: Shilpa Singh <shilpa.singh@samsung.com>

Test Plan: bezier-transition-example.edc added

Reviewers: shilpasingh, cedric

Subscribers: poornima.srinivasan, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-19 14:17:00 +02:00
Daniel Kolesa 943ed065a2 eolian: new syntax for params/values/keys
Instead of "@in type name;" we now use "@in name: type;". This change
is done because of consistency with the rest of Eolian; pretty much
every other part of Eolian syntax uses the latter form.

This is a big breaking change in the .eo format, so please update your
.eo files accordingly and compile Elementary together with the EFL.

@feature
2015-05-18 16:14:31 +01:00
kumar navneet 9c7eeafb9c edje: add set_state_anim API to embryo script.
Summary:
Issue: Current embryo script do not provide any mechanism to set transition type in animation
Solution: A new API set_state_anim is added.

Signed-Off by: Kumar Navneet <k.navneet@samsung.com>
Signed-Off by: Shilpa Singh <shilpa.singh@samsung.com>

Test Plan: A test edc (embryo_set_state_anim.edc) is added to edje examples to test set_state_anim API.

Reviewers: shilpasingh, raster, cedric

Reviewed By: cedric

Subscribers: poornima.srinivasan, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-18 11:04:11 +02:00
Carsten Haitzler b2c333cc7a edje edc examples - remobe trailing \ from edc list
this may be a build issue - i don't see it though.
2015-05-18 17:00:05 +09:00
kumar navneet e9903b4dd5 set_tween_state_anim API added.
Summary:
Issue: Current embryo script do not provide any mechanism to set transition type in animation, by default supports only linear
e.g: set_tween_state API
Solution: To not break backward compatibility, a new API set_tween_state_anim is added in which we can even specify type of transition required.

Signed-Off by: Kumar Navneet <k.navneet@samsung.com>
Signed-Off by: Shilpa Singh <shilpa.singh@samsung.com>

Test Plan: A test edc (embryo_tween_anim.edc) is added to edje examples to test set_tween_state_anim API.

Reviewers: raster, cedric, shilpasingh, Hermet

Reviewed By: shilpasingh

Subscribers: poornima.srinivasan, SubodhKumar, rajeshps, cedric, govi

Differential Revision: https://phab.enlightenment.org/D2344
2015-05-18 15:22:02 +09:00
Shinwoo Kim 7c1e2f165e [ecore_evas_extn] add function to block mouse event.
Summary: add ecore_evas_extn_socket_events_block_set/get

Test Plan: add mouse event callback, and check whether it could get event or not

Reviewers: raster, woohyun, jaehwan, Sergeant_Whitespace

Reviewed By: Sergeant_Whitespace

Subscribers: Sergeant_Whitespace, seoz, cedric

Differential Revision: https://phab.enlightenment.org/D2268
2015-05-15 16:46:22 +09:00
katpavalli de9021d3ca edje: support translation on static strings in edc.
Summary:
   Internationalisation of the static text specified as part of the edc is implemented.
   Problem: Static text when specified in the edc, remains unchanged when the system language is changed.
   Solution: Language support is provided even for the static strings in the edc.

Test Plan:
   Test code to test this implementation is done as part of efl/src/examples/edje/edje-text.c and efl/src/examples/edje/text.edc
   Compile the code with the below  command
   edje_cc -md <dir path>/efl/src/examples/edje/ text.edc && gcc -o edje-text edje-text.c `pkg-config --libs --cflags ecore-evas edje evas ecore`
   ./edje-text

   1) change the language of the system using the command
      export LANGUAGE=hi
      ./edje.text

      Not the text Loading gets displayed in hindi language

   2) change the language of the system using the command
      export LANGUAGE=ta
      ./edje.text

      Not the text Loading gets displayed in tamil language

   3) change the language of the system using the command
      export LANGUAGE=en
      ./edje.text

      Not the text Loading gets displayed in english language
As the number of .mo files in the /edje folder can be increased, those many languages can be supported

Reviewers: cedric, shilpasingh

Reviewed By: shilpasingh

Subscribers: cedric, rajeshps, govi, poornima.srinivasan

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-14 18:41:47 +02:00
Cedric BAIL b1dc737168 evas: fixing examples after change on Evas_3D. 2015-05-10 23:23:26 +02:00
se.osadchy 0e63131232 evas: fix bug in the example of evas-3d-cube-rotate.
Summary: Refactoring of code and fix work of signals for normal rotation of cube.

Reviewers: cedric, raster, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-10 23:08:46 +02:00
Oleksandr Shcherbina 8ee33c1f41 evas: pass disable atlas flag between Evas_3D_Texture and Evas_GL_Image
Summary:
Bind flag atlas_enable.
Build adjusting matrix only in case getting texture unit with atlas.

Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-10 22:55:59 +02:00
Daniel Kolesa bcdabb197b eolian: change all EFL .eo files to use new syntax for properties 2015-05-07 16:36:58 +01:00
Bogdan Devichev 2743afb0c6 evas: torus is normalized in Evas_3D examples.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Bogdan Devichev badb47d7f5 evas: surface primitive is normalized in Evas_3D examples.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Bogdan Devichev 1d47e81e2e evas: sphere is rotated to standard axis and fix tangents of sphere for Evas_3D examples.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Bogdan Devichev c700e243b5 evas: fix indexation of grid (it neccessary for future tangent calculation) in Evas 3D examples
Summary: New indexation for more easy calculation of tangents.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Felipe Magno de Almeida e5874cc1ec Fix ecore_con_eet_client_example example compilation error
Added eet to include flags for Makefile.am for ecore examples
2015-04-23 22:20:16 -03:00
Cedric BAIL 72ca2b7ec9 ecore: build newly added Ecore_Con examples. 2015-04-22 15:10:20 +02:00
Srivardhan Hebbar 3e4b061206 ecore_con: example program for ecore_con_eet.
Summary:

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:20 +02:00
Srivardhan Hebbar eaa163600f ecore_con: fix ecore_con_lookup_example to actually exit when done.
Summary:
Without ecore_main_loop_quit the example won't end. So added that and as ecore_init is done in ecore_con_init removed that.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:19 +02:00
Subhransu Mohanty 58230f7bec evas: update Evas_Object_VG examples to use eina_matrix api correctly after change.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-17 10:53:05 +02:00
se.osadchy 9642c3c9aa evas: fix bug in Evas_3D examples.
Summary: Fix evas-3d-shooter and evas-3d-parallax-occlusion.

Reviewers: cedric, raster, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-16 19:21:45 +02:00
se.osadchy 0a8c3a8b7b evas: fix compilation in the Evas 3D examples.
Summary: Fix compilation line.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-15 12:16:51 +02:00
Vitor Sousa 2cfb62c066 eolain_cxx: Fix C++ support for new Eolian features
Added optional constructor methods for C++ Eolian wrappers.
Changed the interface of wrappers' main constructors.
If there are optional constructor methods they should be passed as variadic
template argument at the end of the constructor.
To support variadic template arguments, the optional "parent" parameter is
now the first parameter and there is another constructor without the
"parent" parameter.

Checking for @optinal and @nullable attributes instead of @nonull.
Now @nonull is the default, and eina::optional is only used when @optional
or @nullable attribute is specified.

The names of constructor methods no longer have the class name prefixed.

Added unit tests for checking the binding of optional constructors.
Added new .eo file to be used in the test.

Changed the generated documentation of constructors.

Changed the efl::eo::inherit accordingly, to address these new features.
Now the constructor methods should be explicit called in the
efl::eo::inherit constructor, which will receive them via variadic
template arguments.

Added another constructor to efl::eo::inherit for passing the parent
object.

Updated some tests and examples to follow the new interface.

Removed some code that is no longer necessary.

Also, fix Eolian C++ support for constructing properties. fix
assertion when parsing constructing properties.

Now if a property is a constructing property eolian_cxx will generate a
constructor method that have the property name (without the "_set" suffix).
2015-04-14 01:06:57 -03:00
Vitor Sousa 0f8eee760e eolian_cxx: Add protected methods and events to C++ wrappers and fixes
Using eina::string_view in eolian generated interfaces (instead of
std::string) to allow lightweight passing of both C strings and C++
std::string.

Also, No longer using eina::optional in generated headers for types
that already implements the concept of null state (like Eo wrappers
and eina_accessor).

Also fix allocating callback objects require by class methods
(i.e. static) in static vectors so the memory will be freed when the
programs exit.

Added a new test case for testing callbacks on class methods.

Moved method definitions and supplementary code from generated C++
wrappers to auxiliary header file (.eo.impl.hh) generated together
with the main ".eo.hh" file. Updated Makefiles to list such files in
the compilation and cleanup processes. Updated .gitignore to include
these new generated files.

Made general adjustments on the documentation of generated C++ wrappers

Added "PREDEFINED" preprocessor macro definition in the Doxyfile.in in
order to make some adjustments for better documentation in the C++
generated headers.  Excluding generation of documentation for classes
in the "eo_cxx" namespace (the namespace for "abstract" eolian C++
wrappers).  Now generating the documentation for the events too.
Hiding some auxiliary code from being documented. Some aesthetic
adjustments for generated white space. Generate documentation for the
main constructor of C++ wrappers and added auxiliary grammars to list
parameters names.
2015-04-14 01:06:57 -03:00
Oleksandr Shcherbina d36e5eab5c [evas/evas_3D] Some fixes in evas-3d-shadows example
Summary:
Regard to this https://phab.enlightenment.org/D2250 improve view of 3D objects
Improve bug with incorect changing shade mode for billboard

Reviewers: Hermet, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2299
2015-04-10 14:20:35 +09:00
Felipe Magno de Almeida 7276b7bc40 eio model: Removed non-existent emodel.la library linking
The library emodel.la doesn't exist. Emodel is now efl model interface. No need to link to it.
2015-04-09 17:43:05 -03:00
Felipe Magno de Almeida 9daa52282d evas-3d: Fix example compilation of evas_3d_blending 2015-04-09 17:41:34 -03:00
Felipe Magno de Almeida 1f7fad2831 emile: Fix eina examples compilation when using a different build directory
The Makefile.am added only include dirs for top_builddir. Added for top_srcdir as well so it can find the headers.
2015-04-09 17:25:20 -03:00
Bogdan Devichev ebfc95517e evas-3d: blending example uses spheres from primitives
Reviewers: Hermet, raster, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2162
2015-04-07 09:17:24 +09:00
Bogdan Devichev d15788e34f evas-3d: fog example uses spheres from primitives
Reviewers: Hermet, raster, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2166
2015-04-07 09:14:42 +09:00
Bogdan Devichev ed414e4b47 evas-3d: T2226 (Evas Eet saver does out of range access) fixed.
Summary:
texcoord now is 2D vector

@fix

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2233
2015-04-06 14:13:30 +09:00
Oleksandr Shcherbina 846e140c27 [evas/evas_3D] Billboard mechanism
Summary:
Add pointer to target billboard node in Evas_3D_Node
Skip set flags change orientation for billboard node
Add method node_billboard_update to use it for change orientation during traverse
by nodes
Split API evas_3d_node_look_at_set to have possibility change orientation of node
without set flags

Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2245
2015-04-06 14:10:28 +09:00
Bogdan Devichev c6a46319fa evas-3D: primitives: cylinder is standardized now (normalized and z is a axis of symmetry)
Summary: {F13942}

Test Plan: D2248 gives app for testing.

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2250
2015-04-06 13:58:22 +09:00
Bogdan Devichev adb85bb8b4 evas-3d: parallax-occlusion example is fixed.
Summary: wrong pathes to resources are fixed

Reviewers: cedric, Hermet, raster, Sergeant_Whitespace

Reviewed By: Sergeant_Whitespace

Subscribers: Sergeant_Whitespace, Ievgen, cedric

Differential Revision: https://phab.enlightenment.org/D2235
2015-04-06 11:01:14 +09:00
Bogdan Devichev 5b114d3d06 evas-3D: primitives: cone is standardized now (normalized and z is an axis of symmetry)
Summary: {F13944}

Test Plan: D2248 gives app for testing.

Reviewers: cedric, Hermet, raster, Sergeant_Whitespace

Reviewed By: Sergeant_Whitespace

Subscribers: Sergeant_Whitespace, cedric

Differential Revision: https://phab.enlightenment.org/D2251
2015-04-06 10:58:28 +09:00
Larry Jr 8c6d524ccd emodel: Created Emodel and Eio_Model. 2015-04-05 15:19:45 +02:00
Subhransu Mohanty fde5f99255 evas: update batman example with shape property interpolation
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:38:13 +02:00
Subhransu Mohanty 83cf776163 evas: update batman example with transformation and opengl.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:34:17 +02:00
Cedric BAIL b43f16259f evas: don't track generated content. 2015-04-03 16:34:12 +02:00
Cedric BAIL b4a1658b20 evas: use legacy API for VG example. 2015-04-03 16:34:01 +02:00
Subhransu Sekhar Mohanty c718269544 evas: remove duplicated shape data and modified animation time in evas-vg-batman.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:33:46 +02:00
Cedric BAIL 889e5081d0 evas: call batman to the rescue !
The animation is not pretty yet, but definitively a nice demo of a
changing shape with current Evas_VG API.
2015-04-03 16:33:43 +02:00
Cedric BAIL 02f4480cbe evas: correct evas_vg_simple header description. 2015-04-03 16:33:32 +02:00
Cedric BAIL 2ad7fd2b5b gitignore: don't track generated examples. 2015-04-03 16:33:11 +02:00
Cedric BAIL 648a81da73 evas: fix example with new namespace. 2015-04-03 16:33:09 +02:00
Cedric BAIL 2c156145b7 evas: fix Evas_3D examples with new Efl interface API. 2015-04-03 16:33:06 +02:00
Cedric BAIL bb42e58474 evas: check rect and circle rendering with SVG specification in Evas_VG example. 2015-04-03 16:32:56 +02:00
Cedric BAIL 9a0b222acb evas: migrate Efl.VG example to legacy API. 2015-04-03 16:31:27 +02:00
Cedric BAIL 69389fd01e evas: fix Evas_VG examples to match new API. 2015-04-03 16:31:23 +02:00
ChunEon Park 2679106665 evas: add evas_vg_simple example.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-03 16:31:20 +02:00
Cedric BAIL 9d057a6a09 eolian_cxx: fix change visibility to visible. 2015-04-03 16:30:48 +02:00
Cedric BAIL ff89d0a08e evas: fix example to follow new Efl.Gfx interface. 2015-04-03 16:30:47 +02:00
Cedric BAIL 3674420a71 evas: fix examples dependencies as they don't use the rest of the infra to discover it. 2015-04-03 16:22:27 +02:00
Srivardhan Hebbar a4f8fa0679 ecore_con: add example for ftp upload.
Summary:
Added example for ftp upload. In the .gitignore only 2 files added which were missing. The differences it is showing is cos of reordering. I did ls and redirected the file to gitignore. So the files got reordered.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-25 19:40:41 +01:00
ChunEon Park 257c5cad95 Revert "evas-3d: materials in .mtl format are deleted"
This reverts commit 59271716ba5443bcba215f5dfbc190fc107ae4ab.

This patch submitted twice.
2015-03-20 18:35:00 +09:00
Bogdan Devichev 67af2ebcc2 evas-3d: materials in .mtl format are deleted
Summary: Materials are not used in any loader and will not be used in nearest future.

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Conflicts:

	src/examples/evas/Makefile.am
2015-03-20 14:57:11 +09:00
Cedric BAIL d5646aa0fc evas: use switch instead of a serie of if for cleaner example. 2015-03-19 17:34:46 +01:00
Cedric BAIL cb7e7ca282 evas: remove unused variable. 2015-03-19 17:20:56 +01:00
Cedric BAIL 5de243cff3 evas: remove useless line. 2015-03-19 17:19:48 +01:00
Bryce Harrington 8865d38d54 Spelling fixes
Summary:
emmited  ==> emitted
resistence  ==> resistance
occured  ==> occurred

Reviewers: cedric, zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2192
2015-03-18 21:38:33 -04:00
Bogdan Devichev f022b53f25 evas: Evas_3d proxy example uses cube primitives.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:21 +01:00
Bogdan Devichev 42617a9bf8 evas: pick example uses sphere primitives.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:21 +01:00
Bogdan Devichev b47660db7e evas: frustum example uses sphere and cube primitives.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Dmytro Dadyka 67df8fdc31 evas: Evas_3D - add alpha testing.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: Ievgen, cedric

Differential Revision: https://phab.enlightenment.org/D2046
2015-03-18 15:22:20 +01:00
Bogdan Devichev bc6fb7bef3 evas: cube-rotate example uses cube primitives.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Bogdan Devichev cc5ff8d212 evas: cube2 example uses cube primitives.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Bogdan Devichev 32cce2cab9 evas: aabb example uses cube primitives.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Bogdan Devichev d5cf6ebfc4 evas: refactor colorpick examples.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Bogdan Devichev 05c1f3da4b evas: fix shadows examples to see normalized primitives.
Reviewers: cedric, Hermet, raster

View and composition will be restored after refactoring of all primitives.

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Bogdan Devichev be13d17e8e evas: fix parallax-occlusion example camera to save view of example with normalized cube.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 15:22:20 +01:00
Cedric BAIL 9af5d7e026 evas: build Evas_3D examples with helper. 2015-03-18 15:22:20 +01:00
Bogdan Devichev 86ca1f6742 evas: Evas_3D primitives: square, sphere and cube are normalized.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 12:23:06 +01:00
Bogdan Devichev 2d34287578 evas: shooter resources is recycled and added in right way.
Summary:
- little symbols in pathes
- new standard pathes for assets for big examples
- deleted the largest resources
- size of shooter folder less than 4 Mb now

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2131
2015-03-18 12:18:30 +01:00
Bogdan Devichev 856a4a8a4e evas: add evas-common.h to dist and move resources of parallax-occlusion to comon directory.
Reviewers: Hermet, raster, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-18 11:49:31 +01:00
Cedric BAIL 43187b66a9 emile: build examples after adding emile. 2015-03-17 09:58:19 +01:00
Jean-Philippe Andre c19685c845 Fix a previous commit: remove binary files and garbage in src/
When rebasing the commits, I have been lazy and did a git add src/ that
actually added the files that were not ignored. My bad, sorry about that.
The original patch was fine.

Thanks sung.
2015-03-16 16:09:47 +09:00
Dongyeon Kim 54cd4f7bf1 Evas GL: change function naming and small bug fixes
Summary:
Remove gles1 prefixes for functions that are also used by gles3.
Refactor evgl_make_current a little bit.
Destroy indirect context properly.
Some log message changes and typo fixes.

Test Plan: Local tests on desktop PC

Reviewers: jpeg

Subscribers: mythri, mer.kim, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2104
2015-03-16 15:56:48 +09:00
Stefan Schmidt 1a081aadf9 examples/evas: Remove no longer existing resources from dist
These have been removed recently but forgotten in the distribution
of automake.
2015-03-11 08:57:25 +01:00
Jean-Philippe Andre de710b02df Evas GL example: Fix usage of the config struct
Also use depth24 as it's more commonly supported than 32 bits.
2015-03-09 21:15:46 +09:00
Avi Levin a1336db324 examples: fix bad unref's in ecore and evas.
Summary:
recived Error that object already deleted in the following files:
In evas-object-manipulation-eo.c: d.clipper and d.bg where created with
eo_add ( 1 ref ) but where unrefd twice: once explicity and once when
d.ee were deleted.
In ecore_indler_example: ctxt->idler were again explicity unrefd and
again unrefd by ecore_shutdown.
@fix

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:22 +01:00
Bogdan Devichev ceb9bdf766 evas: recycling of resources (deleted mine and eagle) in Evas_3D examples.
Summary:
Unneccessary resources are deleted.
In example of frustum used sweet_home.
In example of colorpick used sphere primitive.
Possibility to set precision of spheres deletes need in high quality mesh.
For spheres used textures of wood and rock, so for good work of colorpick https://phab.enlightenment.org/D2044 should be merged firstly.

Reviewers: cedric, raster, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:21 +01:00
Bogdan Devichev 2adb57195f evas: materials in .mtl format are deleted
Summary: Materials are not used in any loader and will not be used in nearest future.

Reviewers: cedric, raster, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-06 20:19:21 +01:00
kabeer khan b89e4f2d1f evas/examples: Resolved warning in evas-3d example
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric, Hermet

Reviewed By: Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2088
2015-03-04 13:02:07 +09:00
Bogdan Devichev 3198c0778e evas-3d: recycling of resources for .ply import/export example
Summary: Smaller resources for .ply example.

Test Plan: run evas-3d-ply.c

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2069
2015-03-03 11:44:40 +09:00
Bogdan Devichev 513ef118ee evas-3d: recycling of resources for mmap example
Summary: Models for mmap example are more than tan times smaller.

Test Plan: run evas-3d-mmap-set.c

Reviewers: cedric, raster, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2073
2015-03-03 11:23:55 +09:00
Bogdan Devichev b22791cf37 evas-3d: deleted some unneccesary resources and moon-space example
Summary: This example is deprecated. We have another (pick) to show functionality of it.

Test Plan: Need merged D2044 to run pick example.

Reviewers: cedric, raster, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2074
2015-03-03 10:58:59 +09:00
Dmytro Dadyka b7e632f2cc evas: Evas_3D - add terrain mesh.
Reviewers: Hermet, Oleksander, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-26 21:06:38 +01:00
Dmytro Dadyka e06b6897f5 evas: Evas_3D - fix coding style
Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-26 21:06:38 +01:00
Stefan Schmidt 028f6ebc68 build: Unify use of $(MKDIR_P) for creating a dir within the build system
While we used different variation of mkdir -p all over we also had spots
where we did not use the option. This is one step in trying to make our
build system ready for parallel install. Using something like -j 10 even
for the install should help to speed up our jenkins jobs as well as distcheck.
2015-02-25 16:43:35 +01:00
Bogdan Devichev 664305e135 evas: textures are standardized 256*256.
Summary:
Textures for evas-3d are standardized 256*256.
.tga for parallax occlusion aren't changed to save alpha channel.
-50Mb for efl without obvious lost of quality

Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-23 19:24:32 +01:00
Cedric BAIL 614f5ef753 eo: fix examples to follow new eo_do syntax. 2015-02-23 18:46:11 +01:00
Bogdan Devichev 167dff4f71 evas: refactoring evas examples descriptions.
Summary:
Descriptions of evas examples are standardized.
Added missing descriptions to examples.
Deleted copy of description in evas-init-shutdown.c.

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-23 18:31:43 +01:00
Cedric BAIL e529cb261c gitignore: don't track generated example. 2015-02-23 15:46:55 +01:00
Cedric BAIL b3029cc9b0 evas: build evas_3d_parallax_occlusion. 2015-02-23 15:46:54 +01:00
Bogdan Devichev b8402cfdcc evas: some fixes to evas examples.
Summary:
Fixed : errors (connected with eo and new resources path) in evas-object-manipulation-eo.c
Fixed : warning: format not a string literal and no format arguments [-Wformat-security]
FIxed : unused variables in evas-images3.c are deleted

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-23 15:46:54 +01:00
kabeer khan 29978825e3 edje: updated .gitignore to ignore edje-edit-part-box example.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-23 15:46:41 +01:00
Dmytro Dadyka 88d4de9292 evas: Evas_3D - add parallax occlusion shading.
Reviewers: Hermet, cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2018
2015-02-23 15:46:25 +01:00
Bogdan Devichev f2719d1d8d evas: resources for evas-2d examples are added to resource folder.
Summary:  Process of loading is standard now. TODOs which are added here will be done in one of the next commits soon.

Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 18:37:03 +01:00
Dmytro Dadyka d59f80e7b2 evas: Evas_3D - add common code for primitive shape.
Reviewers: Hermet, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 18:36:56 +01:00
Bogdan Devichev a87054a42d evas: Evas_3D - add creation of folder for saving and usage of PACKAGE_DATA_DIR to every example of Evas_3D.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 12:19:30 +01:00
Bogdan Devichev bdb10423d5 evas: Evas_3D - Makefile updated for resources ordering in evas examples.
Reviewers: cedric, Hermet, raster

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-18 22:42:41 +01:00
Bogdan Devichev 7a059facf3 evas: Evas_3D - regularize resource for 3D examples.
Summary: This commit makes folder of examples for evas more ordered.

Reviewers: raster, Hermet, cedric

Subscribers: artem.popov, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-18 22:42:20 +01:00
Cedric BAIL 8ab7b0239b evas: remove compilation warning. 2015-02-18 22:42:17 +01:00
perepelits.m 1544035b64 evas: Evas_3D - improve Shooter example.
Summary: This example includes some previous developments to create 3d-world mechanics.

Reviewers: cedric, raster, Hermet

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-18 22:42:17 +01:00
Oleksandr Shcherbina 51722a54d8 evas: Evas_3D - callbacks for Evas 3D.
Summary:
Add class and type Evas_3D_Callback like wrapper under smart object
Incapsulate Evas_3D_Callback in Evas_3D_Object
Add virtual function register and unregister in Evas_3D_Object
Add function evas_3d_callback_call
Add callbacks clicked and collision for Evas_3D_Node

@feature

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

Subscribers: artem.popov, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-18 22:42:07 +01:00
kabeer khan 11a5f1691a evas: updated .gitignore to not track evas_3d_colorpick example.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: cedric, Oleksander

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-16 12:11:28 +01:00
Vitalii Vorobiov 0b6f8f2ced edje: Edje_Edit - add examples for it's API using for BOX part and items
Summary:
Some little example about how and when edje_edit functions can be applied.
In this example there is a box part with items in edj, and by using edje_edit
program actually changes edj file directly. (adding items,
changing layouts of box, changing params of items, etc).

It is pushed as a reference for people who would like to do there own
Edje editor. Normal application should not use that API.

Reviewers: Hermet, raster, seoz, cedric

Reviewed By: cedric

Subscribers: cedric, reutskiy.v.v

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-16 12:10:07 +01:00
Daniel Kolesa f07b316f38 edje, eeze: compiler portability (use full ternary operator) 2015-02-13 14:20:32 +00:00
Bogdan Devichev 83ba92a678 evas: Evas_3D - iport/export of Obj format can be read even if obj-file does not have normals or tex-coords.
Summary:
This commit fixed several bugs, and show what was be fixed.

Bugs:
- When designer save obj file in Blender, he/she can set flags (fig 1). Normals and UV coords flags was necessary  for obj loader. Loader crushed when they are not set as true. It fixed by this commit.
- Another loaders set default values to data which aren't in loading file, so mesh need more memory for unused data. It fixed by this commit for obj and will be fixed for another formats in future.
- Saver saved incorrect data if normals or tex_coords was not set in mesh in evas. Now it fixed.
- Saver failed if it save mesh without material. It fixed and in this case material file is not created now.
- Also fixed some leaks and undefined behavior which valgrind shows.

Example:
- Example shows cases described above. Example use files saved with different flags for it.

Resources:
- man_mesh is replaced by several smaller file, to use them for showing new features and fixes. For example, similar to that models can be added when implement work with material for obj, work with different flags for obj loader/saver etc. (big count of man_meshes is to much memory).
- texture for home is flipped, because of bug with texture in efl to see if tex_coords is incorrect.

Test:
- test should be rewritten in future, because another formats still use default values for normals and tex_coords. And test can not pass for all types of obj file because of standardization for any format in him.

Test Plan: Test suit will be rewritten after correcting of other formats (they will set NULL to file when save an empty data (like mesh without normals))

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 18:31:53 +01:00
Oleksandr Shcherbina d31b7747e1 evas: example for Evas_3D color pick
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 18:05:54 +01:00
kabeer khan de27d19b8a evas: add image orient set/get API in software backend for now.
Summary:
Added API's to rotate(0, 90, 180, 270), flip(horizontal, vertical, transpose, transverse)
evas image object. Also added example to demonstrate this.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: raster, stephenmhouston, cedric

Subscribers: stephenmhouston, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-11 17:30:54 +01:00
Srivardhan Hebbar d0032ae571 ecore_con: remove code in examples that triggered warnings.
Summary:
When the examples were compiled they used to through the below warning
$ gcc -o ecore_con_client_simple_example ecore_con_client_simple_example.c `pkg-config --libs --cflags ecore ecore-con eina`
ecore_con_client_simple_example.c:11:0: warning: "EINA_UNUSED" redefined
 # define EINA_UNUSED
 ^
In file included from /usr/include/eina-1/Eina.h:215:0,
                 from /usr/include/ecore-1/Ecore.h:304,
                 from ecore_con_client_simple_example.c:5:
/usr/include/eina-1/eina/eina_types.h:112:0: note: this is the location of the previous definition
 #  define EINA_UNUSED __attribute__ ((__unused__))
 ^
So removed these defines as they are no longer required now.

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-03 14:30:27 +01:00
ChunEon Park 5309b60000 evas/examples: just change file name. 2015-02-03 10:50:03 +09:00
Dmytro Dadyka 8881aa7315 [Evas: Evas_3D] Improve shadows example.
Reviewers: cedric, raster, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1891
2015-02-03 10:44:44 +09:00
Stefan Schmidt 5919c8b6fc examples/evas: Add evas_3d_shadows binary to .gitignore 2015-01-19 10:41:47 +01:00
Stefan Schmidt d17b6df10d examples/eina_inarray: Remove unused variables. 2015-01-16 10:39:24 +01:00
Stefan Schmidt bae8e9f320 examples/elocation: Remove unused config.h include
It is not needed here.
2015-01-09 18:25:42 +01:00
Stefan Schmidt 5b16397bbe examples/evas-3d-blending: Remove unused global variable.
This got shadowed in one of the functions and is not used at all.
2015-01-09 18:25:41 +01:00
Stefan Schmidt a680595d31 examples/evas-3d-shadows: Avoid shadowing a global variable. 2015-01-09 18:25:41 +01:00
Stefan Schmidt 3aadca5eab examples/evas-3d-frustum: Remove unused variables. 2015-01-09 18:25:41 +01:00
Stefan Schmidt 45accd543e elocation: Mark elocation as BETA API for the upcoming 1.13 release
It is not ready as a public API yet. It needs to run on GeoClue1
and GeoClue2 which will definitely bring API changes as some parts
are tied to mcuh to what GeoClue1 offers right now.
2015-01-09 18:25:41 +01:00
Jean-Philippe Andre 53e8731a23 Evas examples: Fix comment also in evas-map-aa.c
i'm dumb and didn't even read the line above the one i changed...
2015-01-07 17:56:40 +09:00
Jean-Philippe Andre dc9644428c Evas examples: Fix command line in evas-map-aa.c 2015-01-07 17:50:33 +09:00
Dmytro Dadyka 7afd085306 [Evas: Evas_3D] Fixed bug with bounding shapes update.
Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1851
2015-01-07 12:58:51 +09:00
ChunEon Park c2a7a73266 evas/examples: do build evas_3d_shadows 2015-01-07 12:04:21 +09:00
Dmytro Dadyka 821747894e [Evas: Evas_3D]Fixed bug with shadows and blending of vertex position
Reviewers: cedric, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1850
2015-01-07 12:00:47 +09:00
Larry Jr 74e90e9884 allow C++ user create new classes inheriting from Eolian generated Classes 2015-01-05 15:52:27 -02:00
Vitor Sousa d779be68e6 eolian_cxx: Fix "dreaded diamond" inheritance problem for C++ wrappers
Solved diamond inheritance problem by completely removing inheritance in
the abstract class.
All ancestors are inherited directly in the concrete class.
The algorithm that list the ancestors also avoid repetition.

Now concrete classes define methods too. This helps referring the correct
method directly by the object type (when there are methods with the same
name).

Moved the declaration and definition of constructor methods to the concrete
class, since they should not be used in derived classes.

Updated example that call "color_set".
With this model, if two ancestor classes have a method with the same name,
to call one of them from a derived class you must write the scoped name of
the member function in the wrapper.
In this case, either Evas.Object and Evas.SmartObject have a property
named "color".

Added "from_global" option to the full_name grammar too.
2015-01-05 15:52:27 -02:00
Vitor Sousa 5239214a63 eolian_cxx: Fix Eolian C++ generated wrapper inconsistencies
In convert.cc: Reading functions instead of implements to convert the
Eolian_Class. It avoids creation of methods that do not belong to the
class, in special it avoids calling the default constructor twice in the
generated code.

No longer generating one constructor in the C++ wrapper for each eolian
class constructor, since the correct behavior demands that all constructor
should be called. Now the wrappers have "constructor methods" that
must be called when creating a new object.

Updated test cases and examples to match the new interface. Some class
constructors and some test cases have to be removed since they were based
on the wrong assumption that constructors are mutually exclusive.

Created new generators for forwarding parameters and for looping over
the relevant parameters to the C++ wrapper executing a generic lambda.

Added a TODO comment regarding the call of constructor methods of all
base classes. Currently there is no base type with constructors, so this
situation should be discussed more.

Added a TODO comment regarding the way callback parameters are being
processed.
2015-01-05 15:52:27 -02:00
Cedric BAIL d2fd0049b6 gitignore: don't track generated file. 2014-12-23 22:37:23 +01:00
Cedric BAIL 1a07e1423d autotools: build new evas_3d_mmap examples. 2014-12-23 22:36:36 +01:00
Bogdan Devichev 5aecd48ac7 evas: make Evas 3d mesh is inherited from Efl.File (functions file_set and save) 2014-12-23 21:20:21 +01:00
Bogdan Devichev 0a2e9903e9 evas: better example of _mmap_set and resources for it are added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev e727ba5aef evas: a _mmap version of the file_set is added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev 5b8d4bd6cb evas: test cases are changed according to changes of API in step 4. Specific logic in obj_saver is removed for standardization of API. 2014-12-23 21:16:19 +01:00
Bogdan Devichev ca12cab774 evas: Evas_3D_Mesh_File_Type sank into oblivion. Changing entry point to model_save_load. Changing API in examples. 2014-12-23 21:16:07 +01:00
Srivardhan Hebbar 919a16d880 eina: add an example to demonstrate different eina insert and sort functions.
Summary:
While going through eina for understanding, wrote  a program to understand
he differences between different eina inarray functions. Thought, this might
be useful for others too, so adding the same.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-22 15:09:59 +01:00
Daniel Juyung Seo 4ecb9d65ca eo: Fix example build problem with DSO.
/usr/bin/ld: isa/eo_isa_interface.o: undefined reference to symbol 'eina_main_loop_is'
/usr/bin/ld: note: 'eina_main_loop_is' is defined in DSO /home//seoz/efl/git/usrcore//binefl//ldsrc:/ libsimple//einasimple_interface.o/:. libsundefined/ libeina.so.1reference  soto  trysymbol  adding' eina_main_loop_isit'
to/ usrthe/ binlinker/ ldcommand:  linenote
2014-12-17 16:59:27 +09:00
Cedric BAIL fa6e4a8182 .gitignore: ignore generated files. 2014-12-12 03:48:32 +01:00
ChunEon Park 815c0f8673 evas/examples: fix warnings.
removed unused.
2014-12-04 19:47:41 +09:00
ChunEon Park 4c093dfa26 evas/examples: fix build break
add dependency libefl to call efl_file_set().
2014-12-04 19:44:00 +09:00
Dmytro Dadyka 7232f5b8b3 evas: Evas_3D - add mesh blending mode.
Reviewers: Hermet, raster, cedric

Subscribers: Oleksander, cedric

@feature

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-01 08:09:29 +01:00
Oleksandr Shcherbina 90f5fbab87 evas: Evas_3D - example which show frustum culing feature
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-01 06:27:40 +01:00
ChunEon Park d87debb492 evas/example - fix wrong image size. 2014-11-26 19:18:57 +09:00
ChunEon Park ab885633b4 evas/examples: add map anti aliasing example. 2014-11-26 19:12:09 +09:00
Jason Gerecke cb00aeafe3 Expose device (e.g. pen) axis information to applications
Summary:
This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc.

Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers).

This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them.

**Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist

//Define and implement new Ecore_Event_Axis_Update events//
 * Harcode axis labels instead of including xserver-properties.h
 * Use C89-style comments
 * Use doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs
 * Reference typedef'd instead of raw types
 * Adjust how we count through valuators to support tilt/az
 * Add support for tilt and azimuth
 * Tweak memory management in case number of valuators differ
 * Expand TWIST axis normalization to declared range
 * Only normalize TWIST axis if resolution == 1 (wacom bug)
 * Cache label atoms on first use to minimize round-trips

//Implement EVAS_CALLBACK_AXIS_UPDATE event and friends//
 * Update to doxygen comments
 * Update comment text to note axes with unbounded/undefined ranges/units
 * Typedef 'Evas_Axis_Label', 'Evas_Axis'
 * Move typedef for 'Evas_Event_Axis_Update'
 * Reference typedef'd instead of raw types

//Wire the Ecore and Evas implementations of axis update events together//
 * Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h
 * Move ecore_event_evas_axis_update to more logical position

//DEBUG: Add axis update logging to evas-multi-touch.c//
 * Removed from patch set

//Make evas-multi-touch demo use new axis functionality//
 * Have pressure adjust rectangle brightness instead of size
 * Use more available axis data when rendering rectangle (azimuth, tilt, twist)

Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly.

Reviewers: cedric, raster

Subscribers: cedric

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

Conflicts:
	src/lib/ecore_input/Ecore_Input.h

Carsten Haitzler -

** fixed forward enum typedefs (make things unhappy)
** fixed conflict above
** fixed wrong param type for _evas_canvas_event_feed_axis_update()
** fixed @sinces to be 1.13
** fixed formatting/indeting
** fixed order of operation reliance in if's with ()'s to be clear
** fixed functions to be static that should have been
2014-11-25 12:43:15 +09:00
Stefan Schmidt efa45f8d5f examples/evas: Ignore evas_3d_ply example binary 2014-11-21 11:48:59 +01:00
Stefan Schmidt b1a247ca23 examples/elocation: Shutup some unused parameter warnings 2014-11-17 16:51:55 +01:00
Stefan Schmidt 3d5fe8be21 examples/evas-3d-shooter: Rename varibales to avopid shadowing
Scene is used as local variable in a lot places so we rename the global
scene here.
2014-11-17 16:47:15 +01:00
Bogdan Devichev a3438255cb evas: Evas_3D - add .ply export/import.
Summary:
.ply format is important for relation blender and EFl, because in blender exist only two mesh export API: bpy.ops.import_mesh.ply and bpy.ops.import_mesh.stl. One of them is necessary for .edc 3D generator. Which I writing now.
Sorry, it isn't like image loader. Refactoring of import/export will be soon.

Reviewers: Oleksander, artem.popov, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-11-14 07:11:15 +01:00
Stefan Schmidt 69c3684463 examples/elocation: Add example makefile for elocation
To make the example worthwhile to run alone add a basic makefile for the
example like we do for others.
2014-11-11 11:10:12 +01:00
Stefan Schmidt 7ac1150742 examples/elocation: Add gitignore file for generated elocation examples 2014-11-11 11:08:58 +01:00
Stefan Schmidt 2fbcca50f7 elocation: Add example for using the elocation API
Basic example to show API usage.
2014-11-11 11:03:23 +01:00
Stefan Schmidt 1fdf739ddc examples/eldbus: Initialize all description members
Better to initialize all members here in the example.
2014-11-07 15:05:46 +01:00
Stefan Schmidt fdd256cb3b examples/eldbus: Make sure Eldbus_Service_Interface_Desc is initialized for all members
The property_set callback might be automatically set to NULL here but making it
explicit avoids confusion on how many members this description has.
2014-11-07 14:51:15 +01:00
Stefan Schmidt ed48b95048 examples/eldebus: Unregister service interface on shutdown.
As we use this as an example for devlopers we better also handle the
shutdown case cleanly.
2014-11-07 14:48:18 +01:00
Tom Hacohen 260b2e016a Eo composite: Fix composite object functions to be eo functions.
For some reason, they were normal functions instead of eo functions,
which makes them harder to bind, less safe, and just wrong.
This commit fixes that.
2014-10-21 12:37:00 +01:00
Daniel Zaoui 79c6ceb332 3D Warnings-- 2014-10-21 08:46:23 +03:00
Shinwoo Kim 9112c9e70f [example][evas] add error message, you cannot use this example without the image. 2014-10-21 02:12:25 +09:00
Daniel Kolesa c018955a96 elua: remove testing elementary bindings 2014-10-10 13:04:35 +01:00
Cedric BAIL b348176f20 gitignore: let's ignore some more generated files. 2014-10-08 17:10:28 +02:00
Cedric BAIL 281c6ca162 evas: let's fix all Tasn borkage. 2014-10-08 17:10:28 +02:00
Tom Hacohen 09de5dbd84 Evas examples: Fix 3d aabb example.
This fixes evas-3d-aabb.c after the changes to eo_add.

Fixes T1719.
2014-10-08 09:14:48 +01:00
Bogdan Devichev ece808af23 evas: Evas_3D - add .eet export/import
Summary: The first version of .eet format is added. All changes due to discussion in D1307 are done.

Reviewers: artem.popov, se.osadchy, reutskiy.v.v, Hermet, raster, cedric, Oleksander

@feature

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-06 16:47:25 +02:00
Cedric BAIL c4fa8dc07e gitignore: don't track generated files. 2014-09-30 16:25:46 +02:00
Tom Hacohen ffdd193100 Eo: Get rid of eo_add_custom.
We decided to deprecate this one in favour of setting thing in the
construction between the constructor and the finalizer.
2014-09-25 10:30:56 +01:00
Jihoon Kim 6ef671c7ae Add example code of ecore_imf_context_bidi_direction_set in ecore_imf_example 2014-09-23 10:20:49 +09:00
WooHyun Jung 9f23418088 examples: Change EINA_TRUE/FALSE to ECORE_CALLBACK_RENEW/CANCEL 2014-09-18 13:30:07 +09:00
Savio Sena 2f27ceb8bc eolian-cxx: Update examples syntax and fix implementation accordingly. 2014-09-12 16:12:04 -03:00
Savio Sena 1f2ba6d012 autotools: Renamed EOS variable in the Makefiles uniquely.
EOS in Makefile_Efl.am becomes EFL_EOS.
EOS in examples/eolian_cxx/Makefile.am becomes ECXX_EXAMPLE_EOS.
2014-09-12 16:07:34 -03:00
Savio Sena e4d974005a examples: Fix include file name in Eolian-CXX examples..
ecore_poll.eo.hh -> ecore_poller.eo.hh
2014-09-12 15:28:23 -03:00
Savio Sena 6a0b00f36e autotools: Add -I$(srcdir)/lib/efl/ to the examples.
This fixes 'make examples'.
2014-09-12 15:28:23 -03:00
Savio Sena 9ac409dc18 autotools: Fix Eina++ example.
Added missing source file.
Removed unused EXTRA_DIST.
Fixed some paths used in install-examples and uninstall-local rules.
2014-09-12 15:28:23 -03:00
ChunEon Park 841a2c83de Revert "evas: Evas_3D - add .eet export/import"
This reverts commit 9ebb28e3d6690f8548309fd97d2037c9e4ef2c07.

I didn't mean pushing this patch...
sorry.
2014-09-03 21:30:17 +09:00
Dmytro Dadyka ce1ad8e0aa [Evas/evas-3d] Add shadow maps. Added two scene-API functions for enable and disable shadows on the scene. Added 6 light-API function for set and get the light projection.
Reviewers: raster, cedric, Hermet

Subscribers: raster, cedric

Differential Revision: https://phab.enlightenment.org/D1330
2014-09-03 21:19:16 +09:00
ChunEon Park 781d2a03bf Merge branch 'master' of ssh://git.enlightenment.org/core/efl 2014-09-03 10:57:38 +09:00
Stefan Schmidt c2a06ff0c8 examples: Add latest example binaries to .gitignore
These are build and should be ignored by git.
2014-09-02 17:11:38 +02:00
ChunEon Park d0ab9d817b Merge branch 'master' of ssh://git.enlightenment.org/core/efl 2014-09-02 10:00:11 +09:00
Daniel Kolesa a46650836c eolian: move efl eo files over to the new ctor syntax 2014-09-01 15:53:35 +01:00
Bogdan Devichev a7feb63216 evas: Evas_3D - add .eet export/import
Summary: The first version of .eet format is added.

Reviewers: Hermet, raster, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1307
2014-09-01 22:43:16 +09:00
Daniel Kolesa 34b6914aa2 eo: migrate constructors sections to constructing methods 2014-08-27 15:43:47 +01:00
Cedric BAIL 5c30209744 evas: fix examples with latest eo change. 2014-08-21 17:52:54 +02:00
Julien Isorce aa24bc32fc evas: add example to test transparent background
Summary:

Reviewers: raster, devilhorns, cedric

Subscribers: capOM, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-08-21 12:04:53 +02:00
Daniel Kolesa 6b577aa514 eolian: more consistent syntax
"legacy foo" is now "legacy: foo" and "return foo" is now "return: foo".
2014-08-21 09:26:03 +01:00
Daniel Juyung Seo dec43c21af list example: revert unwanted local change push. 2014-08-18 03:18:07 +09:00
Daniel Juyung Seo c348d59e1e doc: fixed typo. 2014-08-18 01:10:39 +09:00
Savio Sena 513ca1643d eolian-cxx: Renamed event_*_callback_{add,call} to callback_*_{add,call}. 2014-08-13 10:17:53 -03:00
Cedric BAIL f1733466e0 autotools: try to simplify our Makefile.am to reduce warnings. 2014-08-12 11:19:57 +02:00
Cedric BAIL a848242b86 autotools: shutup stupid warning. 2014-07-30 03:42:04 +02:00
perepelits.m d80ff146c3 [Evas\evas-3d\example] Add example of 3d-shooter
Reviewers: cedric, raster, Hermet

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1215
2014-07-29 17:23:54 +09:00
Wonguk Jeong 84e07950cc ecore: fix example build fail (ecore_compose_get_example) 2014-07-29 02:11:17 +02:00
Savio Sena e01d622230 eolian-cxx: Removed a warning from the example. 2014-07-24 19:52:23 -03:00
Savio Sena 4c3dcef161 autotools: Fixed 'make dist' for Eolian-Cxx
Added .eo to EXTRA_DIST and *_stub.h to example's source lists.
2014-07-24 19:52:23 -03:00
Savio Sena f1783cfdc0 eolian-cxx: Added example of Eo implementation in C++.
Instead of implementing Eo functions in C we do it in C++ simply.
2014-07-24 19:52:23 -03:00
Savio Sena d8523ed2ed eolian-cxx: Removes more warnings. 2014-07-21 21:32:22 -03:00
Felipe Magno de Almeida 9a1a0bb93e eolian-cxx: Fixed exapmle with support for complex types
Automatic conversion of Evas_Object* to evas::object wrapper broke the
example. Fixed it by using the new feature :).
2014-07-18 19:00:37 -03:00
Savio Sena b30a2dfba7 eolian-cxx: Updated the examples according to the new syntax. 2014-07-18 18:57:13 -03:00
Savio Sena 58ec781598 eolian-cxx: Added examples.
Added complex types, callbacks and events examples.
2014-07-18 18:57:09 -03:00
Savio Sena f152163bb1 eina-cxx: Added interop containers. 2014-07-18 18:55:56 -03:00
Savio Sena 273e9fede6 tests: Added config.h to tests. 2014-07-18 18:55:56 -03:00
Savio Sena 159eaea005 examples: Removed compilation warnings. 2014-07-18 18:55:56 -03:00
Felipe Magno de Almeida 073f711ce1 eolian-cxx: Fixed example eo file
The coulourable.eo file got outdated when Eolian syntax changed, it is
now updated and fixed.
2014-07-18 12:28:59 -03:00
Felipe Magno de Almeida 8ef2bc4091 eolian-cxx: Disabled temporarily the inheritance feature
This feature is buggy when using multi-level namespaces. I disabled it
temporarily and will fix it ASAP and re-enable it.
2014-07-18 12:28:03 -03:00
ChunEon Park f20d6f5cab evas/evas3d - removed unused warnings in the example. 2014-07-15 12:01:24 +09:00
perepelits.m 4c0c39cd2e [Evas\evas-3d\example] Add example of cube rotation
Summary: This example shows mechanism of 3d object rotation

Reviewers: cedric, Hermet, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1114
2014-07-15 11:59:58 +09:00
taehyub acb5e77c6c evas sample code - remove makefile.am
Summary: evas gl sample

Test Plan: cd efl/ > make examples > cd examples/evas > ./evas_gl

Reviewers: Hermet

Reviewed By: Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1130
2014-07-08 16:16:32 +09:00
Dmytro Dadyka 59c5b79507 evas: Evas_3D - add fog effect. add two API function for enable and disable fog effect for given mesh.
Reviewers: Hermet, raster, cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-07 19:26:48 +02:00
Savio Sena 23c6bce63e autotools: Fixed 'make examples' and 'make examples-install'
It was broken in set-ups with ($(builddir) != $(srcdir)) && ($(builddir) !=
$(srcdir)/build)
2014-07-02 20:01:09 -03:00
Savio Sena 1fef6f92d3 eolian-cxx: Make proper handling of namespaces.
Summary:
The generation of class prefixes was not taking into account the full
classname -- the namespace was not being prepended to it. Fixed that and
also re-organized the code a bit, removed some Wshadow warnings also.

This commit fixes 'make examples' and 'make check'.

Reviewers: tasn, cedric, q66

CC: felipealmeida, smohanty, cedric

Differential Revision: https://phab.enlightenment.org/D1100
2014-07-01 10:55:45 +01:00
Daniel Kolesa b879550d4a eolian-cxx: Added namespaces and more (see below)
Implemented namespaces
Added eolian_wrappers.hh with C++ code wrapping Eolain API
Changed eolian_cxx program options. Now they're eolian_gen's
Added functions to safe_str.hh (safe_lower, safe_upper, normalize_spaces, path_base)
Added a mocked version of type_lookup.hh in advance. The full
version will come as soon as complex-types are added.

Made apply again by Daniel Kolesa, original implementation by Savio Sena.
2014-06-30 19:35:06 +01:00
Tom Hacohen 0ebaf5a0f3 Eo (base class): Fix .eo file to have proper namespacing for the class naem. 2014-06-30 17:47:06 +01:00
Tom Hacohen 0bb21a2ee9 Ecore examples: Add ecore_compose_get() example.
Example created by Vincent Torri.
2014-06-30 17:42:58 +01:00
Vorobiov Vitalii 5e75ab0b34 Documentation: adding missed documentation to edcref (map.color param)
Summary:
There is param (of the map block in part's description) that allows user to
set a color for specified vertex/point of that part.
That param was undocumented so actually no one know that this param is exist and can be used in edj file.

Two main fixes:
- adding documentation for map.color param in edc reference.
- adding .edc source code example for seeing how map.color param works.

@fix

Reviewers: cedric, Hermet, raster, seoz

Reviewed By: cedric

CC: cedric, reutskiy.v.v

Differential Revision: https://phab.enlightenment.org/D1083
2014-06-24 17:11:09 +03:00
Savio Sena 9a5644b285 Eolian-Cxx: Corrected the syntax of the .eo examples and added missing includes.
Summary: Just updating the .eo's to match the new syntax.

Reviewers: cedric, q66, tasn, JackDanielZ

Reviewed By: q66

CC: felipealmeida, smohanty, woohyun, cedric

Differential Revision: https://phab.enlightenment.org/D1067
2014-06-19 23:54:36 +01:00
Savio Sena 5041cfa3a4 autotools: Fix elua 'make examples'.
Summary: Also added evas_3d_object to .gitignore.

Reviewers: q66, cedric

Reviewed By: q66

CC: smohanty, felipealmeida, raster, cedric

Differential Revision: https://phab.enlightenment.org/D1019
2014-06-12 23:31:16 +01:00
Daniel Kolesa dcca1d4bba elua: examples fix, distcheck fix 2014-06-10 15:48:53 +01:00
Daniel Kolesa e0c0573659 elua: some janitoring (add newlines to the end of files) 2014-06-10 15:48:53 +01:00
Daniel Kolesa c924affa72 elua: benchmark module, plus return values for init/shutdown 2014-06-10 15:48:47 +01:00
Daniel Kolesa 82b10de760 elua: elm test entry 2014-06-10 15:48:46 +01:00
Daniel Kolesa 92891c84f9 elua: allow setting of default domain 2014-06-10 15:48:46 +01:00
Daniel Kolesa 4034d40912 elua: more logging functionality (utility funcs for default domain printing) 2014-06-10 15:48:46 +01:00
Daniel Kolesa 96509c3495 elua: start binding Eina
Added initial eina logging module, added library handling utility funcs in util.lua, added .gitignores
2014-06-10 15:48:46 +01:00
Daniel Kolesa 9150448132 Elua: initial commit
Elua is a LuaJIT based runtime for the EFL meant to provide facilities for rapid application development. The name is temporary. The EFL bindings will be generated with Eolian. @feature
2014-06-10 15:48:46 +01:00
Vyacheslav Reutskiy 752873866d Ecore_Evas: add new API for unset the cursor from Ecore_Evas.
Summary:
Add ecore_evas_cursor_unset function.
Use the new function in the ecore_evas_object_example.

@feature

Test Plan: ecore_evas_object_example

Reviewers: raster, cedric, seoz, Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D812
2014-06-10 17:32:11 +09:00
ChunEon Park adce5c9f43 evas/evas_3d - build evas_3d_obj example. 2014-06-09 15:25:55 +09:00
Cedric BAIL edf47fb988 .gitignore: don't track generated file. 2014-06-07 02:47:12 +02:00
se.osadchy 1414a33c68 examples: add new example for Evas_3D.
Summary: This example need for demonstration work of the propagate events.

Reviewers: Hermet, cedric, raster

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-06 19:11:21 +02:00
Bogdan Devichev 6971a3fe61 evas: Evas_3D - add .obj export/import.
@feature

Reviewers: raster, Hermet, cedric

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-05 20:49:26 +02:00
Oleksandr Shcherbina 7a9f1e2552 evas: Evas_3D - Revision frustum culling.
Summary:
Add API that checks OBB's points of node are inside frustum of camera.
Add example with frustum culling.

@feature

Reviewers: Hermet, cedric, raster

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 19:55:34 +02:00
Cedric BAIL 1dfc9fd269 gitignore: let's ignore generated binary. 2014-06-04 19:16:44 +02:00
Savio Sena dca043612b evas: Examples - fix Evsa3D Eo classnames.
Summary: Renamed EVAS_OBJ_.+_CLASS to EVAS_.+_CLASS so that "make examples" works.

@fix

Reviewers: cedric, tasn, Hermet

CC: felipealmeida, smohanty, raster, cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-06-04 00:51:57 +02:00
MinJeong Kim 936242a4f2 eina-tiler:add union, subtract, intersection, equal apis for tilers
Summary:
Support union, subtract, intersection, equal(comparison) between tilers.
@feature

Test Plan: Test with added test case(src/tests/eina/eina_test_tiler.c) and the example(src/examples/eina/eina_tiler_02.c)

Reviewers: gwanglim, devilhorns, raster, zmike, cedric

CC: cedric

Differential Revision: https://phab.enlightenment.org/D880
2014-05-28 16:51:30 +09:00
ChunEon Park d8e9f57686 evas/evas3d - fixed incorrect usage in evas-3d-aabb example. 2014-05-27 22:41:40 +09:00
Oleksandr Shcherbina b0d18c35c3 [evas/evas-3d] Add OBB and AABB.
Summary: Add axis-aligned bounding box (AABB) to frame. Set and update AABB and oriented bounding box (OBB) in node.

Reviewers: Hermet, cedric, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D881
2014-05-27 22:07:29 +09:00
Savio Sena 5e471fd9e4 efl: remove some warnings.
Summary:
Mainly from the examples but also from libunibreak and tests/eet.

I'm not sure if it's really worth to remove warnings from the examples
-- because it adds pedantic-ness to something supposed to be didatic,
but I leave for you guys to judge.

Reviewers: tasn, cedric

CC: felipealmeida, raster, smohanty, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-24 02:27:15 +02:00
ChunEon Park cf1fd2efb6 evas/examples - revised evas-3d-proxy 2014-05-12 16:50:15 +09:00
ChunEon Park fff7f694ea evas/evas3d: applied eo intensively and fix indentation. 2014-05-12 13:30:50 +09:00
Savio Sena 20162de2d2 eolian-cxx: remove annoying compilation warnings and messages
Summary:
- remove an automake warning caused by a variable redefinition
- remove unnecessary verbosity during debug compilation

Reviewers: cedric, smohanty

CC: felipealmeida, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-10 10:15:37 +02:00
Savio Sena 8709d9a99f examples: fix eolian_cxx Makefile.am to work with --with-eolian-cxx.
Summary:
Includes Makefile_Eolian*_Helper.am and -- since
_EOLIAN_GEN_DEP and _EOLIAN_CXX_DEP can't be resolved from
src/examples -- redefine the generation rules locally.

Reviewers: cedric, stefan, stefan_schmidt

CC: felipealmeida, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-09 15:35:51 +02:00
Felipe Magno de Almeida 7d2465be02 eina-cxx: add EFL_PTHREAD_CFLAGS to EINA_CXX_CFLAGS and EFL_PTHREAD_LIBS and -lm to examples
Summary:
EFL_PTHREAD_CFLAGS are needed for tests and users that use
efl::eina::thread's and EFL_PTHREAD_LIBS to eina_cxx, eo and evas examples.

Reviewers: cedric, stefan, stefan_schmidt

CC: cedric, savio

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-09 13:03:05 +02:00
Felipe Magno de Almeida 64cbfa3ea5 eina-cxx: remove unused parameter names and fix function without return in examples.
Summary:
Fix function with return type and not returning any value and
remove warnings about unused identifiers in examples for eina C++.

Reviewers: cedric, stefan, stefan_schmidt

CC: savio, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-09 12:46:48 +02:00
Felipe Magno de Almeida 186f89c09e eolian_cxx: removes C++ examples when C++11 isn't supported
Summary:
Added HAVE_CXX11 guards to Makefile*.am files for C++ binding to avoid
compilation errors for examples when C++11 isn't supported. This also
disable installation of all EFL CXX pkgconfig files.

Reviewers: cedric, stefan, stefan_schmidt

CC: cedric, savio

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-09 12:43:43 +02:00
Jean-Philippe Andre 4cbc120247 Evas doc: Add example for padding_set (filters)
With preview and all.
2014-05-09 16:57:39 +09:00
Jean-Philippe Andre 3608a03818 Evas doc: Move filters examples to Lua
Part 1: auto-generated examples with previews
2014-05-09 16:57:39 +09:00
WooHyun Jung c04b28d9de ecore/example: Modify the explanation of ecore evas extn plug example. 2014-05-09 13:34:38 +09:00
Savio Sena 69017b2e3b eolian_cxx: fix install-examples and (post-install) compilation.
Summary:
This patch fixes T1226 by adding a Makefile.examples to
examples/eolian_cxx. It also fixes a bug in bin/eolian_cxx: the
include paths were not being correctly generated for directories
outside EFL tree.

Reviewers: cedric, smohanty, stefan_schmidt, stefan

CC: uartie, wayland-efl, felipealmeida, raster, woohyun, cedric

Maniphest Tasks: T1226

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-07 23:40:46 +02:00
Felipe Magno de Almeida a4cdc43c03 eolian_cxx: fix compilation of examples out-of-tree
Summary: Changed erroneous top_builddir for include paths for eolian_gen tool.

Reviewers: cedric, stefan_schmidt, stefan

CC: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-07 23:37:47 +02:00
ChunEon Park 394aa81e5c evas/evas3d: removed export of evas_3d_node_add() and apply eo to examples.
but still i don't like eo apis used in app side (if it's only way)
we should export legacy apis for convenience.

lets decide this policy later.
2014-05-07 22:36:34 +09:00
ChunEon Park 6582c3539b evas/evas3d: call eo_unref() after eo_add().
since eo default ref count is 1 and increased by canvas parent again,
they should be unref() called if they wanna deleted automatically.

I wonder if evas unref the objects while it removes the objects from it's list,
then user don't need to call eo_unref() manually which may cause a mistake in usage.
2014-05-07 19:36:45 +09:00
Jaehyun Cho c27ffaf8dc evas-3d: Fix typo in evas-3d-pick.c
Summary: Fix typo with eo_do in evas-3d-pick.c

Reviewers: Hermet

Reviewed By: Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D828
2014-05-07 19:22:52 +09:00
ChunEon Park 2758b20556 evas/evas3d - adjust examples window size. 2014-05-07 16:55:50 +09:00
ChunEon Park 58d87b53ab evas/evas3d: set gl backened forcely in the examples
Right now, evas 3d doesn't support software renderer,
we set the gl backened forcely.
2014-05-07 15:35:36 +09:00
Savio Sena 96c2844b54 examples: fix the include paths of eina example.
Summary:
"make examples" was failing for parallel build set-ups (i.e.,
top_builddir != top_srcdir).

Reviewers: cedric, smohanty, stefan_schmidt, stefan

CC: felipealmeida, cedric

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-06 23:41:12 +02:00
Stefan Schmidt 47724c5bd4 examples: Fix install for eolian_cxx examples
Remove reference to non existing Makefile.example to let the install
succeed.

Fixes T1226
2014-05-06 09:56:46 +02:00
Savio Sena 8af864eb65 eolian-cxx: Fixed the generation .eo.h path.
Summary: This patch fixes T1225

Reviewers: uartie

CC: uartie, wayland-efl, felipealmeida, cedric, smohanty, raster, stefan_schmidt, stefan, woohyun

Maniphest Tasks: T1225

Differential Revision: https://phab.enlightenment.org/D821
2014-05-05 13:09:28 -07:00
Felipe Magno de Almeida 8c78a0c320 eolian-cxx: fix make distcheck and automake files for Eolian C++
Summary:
Fixed distcheck for Eolian C++. Made the generated files as
nodist so it doesn't get picked up for generation way too
early.

Reviewers: cedric, seoz

CC: cedric

Maniphest Tasks: T1220

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-04 12:21:30 +02:00
Savio Sena c4dba109db eolian_cxx: initial version of the EFL C++ Bindings Generator.
Summary:
This patch adds 'eolian_cxx' -- a C++ bindings generator --
to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate
.eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated
bindings).

src/bin/eolian_cxx: The eolian_cxx program.
src/lib/eolian_cxx: A header-only library that implements the C++ code
generation that binds the .eo classes.

=Examples=

src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example,
it just uses some "dummy" generated C++ classes.

src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how
pure C++ classes inherit from .eo generated classes.

src/examples/evas/evas_cxx_rectangle.cc: More realistic example using
the generated bindings Evas Cxx. Still a bit shallow because we don't
have full fledged .eo descriptions yet, but will be improved.

=Important=

The generated code is not supported and not a stable API/ABI. It is
here to gather people interest and get review before we set things in
stone for release 1.11.

@feature

Reviewers: cedric, smohanty, raster, stefan_schmidt

CC: felipealmeida, JackDanielZ, cedric, stefan

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-03 00:56:32 +02:00
Cedric Bail aa6f23f508 evas: don't track Evas_3D examples. 2014-05-01 12:05:37 +02:00
Cedric Bail 53260b8037 evas: fix Evas_3D examples to use Eo API. 2014-05-01 12:05:32 +02:00
ChunEon Park 756fce31dc evas/evas3d: rewrite evas-3d-md2 example with eo based. 2014-04-30 22:02:23 +09:00
ChunEon Park c8488f46bb evas/evas3d: rewrite evas-3d-cube2 example with eo based. 2014-04-30 21:40:47 +09:00
ChunEon Park f2d0858680 evas/evas3d: cleanup cube example code.
fixed eo grammar error.
added static keywords for internal variables.
include eo header explicitly.
fixed indentation.
2014-04-30 21:36:04 +09:00
ChunEon Park b466aea498 evas/evas3d: removed unnecessary header include. 2014-04-30 21:11:48 +09:00
ChunEon Park c2868c6af2 evas/evas_3d: rewrite evas_3d_cube eo based.
still evas_3d_node_add() call should be changed to eo_add().
2014-04-30 20:37:20 +09:00
ChunEon Park ffa810a8a7 ecore/example: --warning.
use scanf() return value for removing compiling warning.
2014-04-29 14:04:10 +09:00
ChunEon Park eaab033561 evas/evas3d: rename 3d_scene_set()/get() to scene_set()/get()
if eolian generates c++ apis, the method name will be started with

numberic character that wont' be accepted by c++ language.

so renamed.
2014-04-25 19:53:18 +09:00
ChunEon Park 62778c8935 evas3d: forget evas_3d.h. it's merged to evas.h
Conflicts:

	src/lib/evas/Evas_3D.h
2014-04-25 17:16:16 +09:00
Subhransu Sekhar Mohanty 5a82a1ed36 Evas: 3D: Change the api name from t3d_scene to 3d_scene as the eolian issue got fixed. 2014-04-25 16:47:32 +09:00
Taekyun Kim aa477c628d Evas: 3D: Add missing image file for example evas-3d-proxy 2014-04-25 16:47:12 +09:00
Taekyun Kim 8d5bfa26e3 Evas: 3D: Updated proxy texture example 2014-04-25 16:42:03 +09:00
Taekyun Kim 0fdd31b981 Evas: 3D: Refined proxy texture implementation
Added new APIs for controlling source object's visibility.
Fixed bugs related to updating proxy textures.
2014-04-25 16:20:24 +09:00
Taekyun Kim b61ceab457 Evas: 3D: Example: MD2 mesh file example
MD2 model file is from http://mb.srb2.org/showthread.php?t=34800
Thanks to Jeck Jim.
2014-04-25 16:19:10 +09:00
Taekyun Kim d4f32b9874 Evas: 3D: Example: Picking example 2014-04-25 16:19:05 +09:00
Taekyun Kim fb67bba733 Evas: 3D: Example: Proxy texture example 2014-04-25 16:18:58 +09:00
Taekyun Kim 475e3001b4 Evas: 3D: Example: Rotating Cube 2
Demonstrating key frame material animation and normal mapping.
2014-04-25 16:18:50 +09:00
Taekyun Kim 1763281956 Evas: 3D: Example: Rotating cube 2014-04-25 16:18:39 +09:00
Daniel Zaoui 50a2ac332b Eo: adapt examples to Eo2.
It includes Eo and Evas porting to Eo2.
2014-04-23 07:56:20 +03:00
Daniel Zaoui d0f5f62666 Eo2: Fix other forgotten ret. 2014-04-11 05:02:54 +03:00
Tom Hacohen 1823adf9b3 Eo: EO_BASE_CLASS->EO_CLASS. 2014-04-10 04:20:21 +01:00
Tom Hacohen b2ef2119d0 Eo: eo_base's data_*->key_data_*. 2014-04-10 04:20:21 +01:00
Cedric Bail e335184d78 ecore_avahi: remove useless printf. 2014-02-28 19:58:25 -03:00
Stefan Schmidt 6cd9fdb400 examples/eina: Check return value of eina_iterator_next
If we define an API with warn_unused_result we should actually
check the result in our examples.
2014-02-28 14:37:53 +01:00
Stefan Schmidt 08ebf05e67 examples: Use EINA_UNUSED in examples to silence a ton of warning
First step to get the examples compiling output in a useful state.
With all the warning noise one would never see the important messages.

If you add new code please make sure its warning free.
2014-02-28 14:37:53 +01:00
Stefan Schmidt 1a7282efb6 examples/evas: Set a proper format string for fprintf
Instead of abusing the format string we should set it.
Was made aware of this problme by chinmaya061 in
https://phab.enlightenment.org/D585

@fix
2014-02-28 12:17:52 +01:00
Cedric Bail 55b44da0d9 ecore_avahi: add an avahi browse example (that doesn't work yet). 2014-02-27 20:09:09 -03:00
Cedric Bail 3364026e82 Revert "evas example: fix warning in compilation of evas-box.c."
This reverts commit 442d880cf6168cb5f13ce7dd566de6bb7bd987d6.

Sorry mixed command of pull/push here.
2014-02-27 11:10:35 -03:00
chinmaya c15cd4eb5b evas example: fix warning in compilation of evas-box.c.
Summary: The warning was "format not a string literal and no format arguments [-Wformat-security]".

Test Plan: gcc -o evas-box evas-box.c `pkg-config --libs --cflags evas ecore ecore-evas eina`

Reviewers: singh.amitesh, seoz, stefan_schmidt

CC: cedric, stefan_schmidt

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

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-02-27 11:09:20 -03:00
Cedric Bail 832d0aec0d eina_cxx: oops forgotten path. 2014-02-26 14:42:29 -03:00
Cedric Bail 641819886e eina_cxx: don't track generated example binary. 2014-02-25 18:36:17 -03:00
Cedric Bail e3f26012fa eina_cxx: remove left over from when Boost was a dependency. 2014-02-25 18:35:04 -03:00
Felipe Magno de Almeida dc7b1cc1cf eina: add a C++ bindings to Eina @feature.
The goal of this library is to make the life of C++ developers easier
when having to manipulate Eina datatype by providing a layer to abstract
those data type in C++. Check examples for now. Documentation will come
soon, but we are pushing that rather sooner to get feedback on those bindings.

As you will notice, this library is just composed of headers. There is no .so
and we do think it is better this way. Reducing ABI and API stability issue for
applications developers who are the primary target of this binding.

Also please note that you will need to have C++11 to use this binding.

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-02-25 18:05:01 -03:00
Daniel Juyung Seo ed0d7bf906 ecore_evas_object_example: Added cursor unset example. 2014-02-24 16:01:37 +09:00
Jean-Philippe Andre 181d9d467e Doc: Fix colors in the filter examples
Since the bg color changed from dark grey to white, the
colors don't match so much anymore... This is just like theme
work.
2014-02-24 11:17:42 +09:00
Jean-Philippe Andre a72be5d076 Evas filters: Improve doc automatization
Include example filter codes from src/examples in Doxygen.
Use these examples for the generation as well.
2014-02-13 17:37:33 +09:00
Sebastian Dröge b9e3e68c3b emotion: Use the GStreamer 1.x module instead of the 0.10 one in the border example application 2014-01-17 09:32:45 +01:00
Guillaume Friloux 9415852834 Fix ecore_con example file to call shutdown functions.
Found by Chris Michael.
2014-01-15 20:42:50 +01:00
Cedric BAIL 953364059f emotion: remove some warning in the example. 2014-01-10 16:37:59 +09:00
Vincent Torri fe0ef92a9e examples: fix various warnings in ecore and eina examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:37:45 +09:00
Vincent Torri 4af198b6da examples: fix pointer <-> int conversion (windows 64 bits) in ecore and evas examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:36:39 +09:00
Vincent Torri 9725e5f8c4 examples: do not do void* arithmetics in evas examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:36:12 +09:00
Vincent Torri e2ca017878 example: fix uninitialized variable in ecore.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:59 +09:00
Vincent Torri 0c20842204 examples: remove unused variables and label
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:47 +09:00
Vincent Torri 70bb750171 examples: remove unused param warnings
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:32 +09:00
Vincent Torri b1355f36f1 ecore: use WIN32 API to port readdir_r in ecore thread example
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:35:18 +09:00
Vincent Torri fc485b765a autotools: really don't build Unix specific example on Windows
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-01-10 16:34:56 +09:00
Cedric BAIL a8c55b5a33 ecore: don't build Unix specific example on Windows. 2014-01-09 10:17:14 +09:00
Jihoon Kim 4013ab2fd2 ecore_imf_example: remove wrong implementation code.
Enter or Escape key should be processed by input method framework.
Editor should not call ecore_imf_context_reset by itself.
2014-01-04 14:23:38 +09:00
Jihoon Kim 0e240a8418 Use key instead of keyname for considering setxkbmap 2014-01-04 13:25:21 +09:00
Daniel Juyung Seo 10f92188c4 efl: 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 12:27:13 +09:00
Sebastian Dröge c76ab3cfc9 emotion: initial port of emotion to GStreamer 1.0
Some commits to port emotion to GStreamer 1.0 and implement some missing features,
clean up code a bit and fix some bugs on the way.

This works as good as the 0.10 code for me now with the emotion examples,
just the Samsung hardware specific code is commented out. This should be
ported by someone who has such hardware, and also in a clean way now that
GStreamer since 1.0 has features to handle all this properly.

There's still a lot of potential to clean things up and fix many bugs, and also
to implement zerocopy rendering. But those are for later if there's actual
interest in this at all.

Commits:

- Update configure checks and ecore example to GStreamer 1.0
- Initial port of emotion to GStreamer 1.0
- Samsung specific code commented out, should be ported by someone
with the hardware.
- Return GST_FLOW_FLUSHING when the sink is unlocked
- Remove unused GSignal from the sink
- Use GstVideoInfo to store the format details inside the sink
- Add support for pixel-aspect-ratio
- Store video format information in GstVideoInfo for the different video streams
- Use GstAudioInfo to store the audio format information
- Remove some unused defines
- Header cleanup
- Implement initial support for GstNavigation interface
- Implement setting of audio/video channel

Reviewers: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-12-23 10:59:42 +09:00
Gustavo Sverzut Barbieri 3bc8f09733 getopt: add positional argument handling.
positional arguments must appear at the end of the description array
(after the last option) and should have a metavar set and not have
shortname or longname. Simple, elegant and fit :-)

There is a new function to parse the positional arguments,
ecore_getopt_parse_positional() because we may want to not try to
parse them in the case of a quit-option such as --help, --license,
--copyright, --version or some user-defined action. This avoids us
producing errors of missing positional arguments when printing help
and adds some flexibility as well.

This should make Tasn happy :-)
2013-12-17 21:06:53 -02:00
Gustavo Sverzut Barbieri d32e6e0500 add great ecore_getopt example.
should cover and explain getopt usage and serve as base for
applications that want to use it (all efl should!)
2013-12-17 18:08:27 -02:00
Cedric BAIL 9ae44f798e Ecore_Avahi: initial commit.
TODO:
- Add tests, how ?
- Integrate with Eo, needed ?
2013-12-17 19:37:05 +09:00
Cedric BAIL 90b9ca3e15 autotools: fix complain about using subdirs without the right option. 2013-12-11 13:46:01 +09:00
Cedric Bail b7962cef2e edje: correctly setup PATH and install Edje file as they are needed by examples.
This will fix T61.
2013-11-28 16:33:32 +09:00
Carsten Haitzler 299eb1b516 ecore-evas - examples - simply broken example - fix
this fixes T558 - it was just a broken example
2013-11-23 23:30:27 +09:00
Carsten Haitzler dca5239d70 evas - examples - fix broken evas stacking example
this fixes a broken example that assumes getting name always succeeds.
this fixes T559
2013-11-23 23:07:54 +09:00
U. Artie Eoff a5ce90074a evas/examples: fix clipper colors in evas-object-manipulation
This makes the clipper colors correct and also gets rid of the
following error message spam:

ERR..._color_set() Evas only handles pre multiplied colors!

Fixes T557

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-11-22 15:35:03 -08:00
Carsten Haitzler 4c04a2f164 ecore-evas - example - fix lack of bg object in sub buffer
this fixes T229
2013-11-17 14:04:40 +09:00
Christophe Sadoine 443765e062 eet: Adding EET_DATA_DESCRIPTOR_ADD_MAPPING_BASIC to add a basic type to a union.
I added EET_DATA_DESCRIPTOR_ADD_MAPPING_BASIC because I need basic types in unions, and EET_DATA_DESCRIPTOR_ADD_MAPPING is only for structs.
I also modified the example with a float and a string.

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-11-04 15:35:41 +09:00
Daniel Juyung Seo 0b4f448ab7 ecore examples: move pkg-config at the end of gcc command.
This fixed build break on my machine.
2013-10-22 00:45:29 +09:00
Carsten Haitzler e56a483b5a eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Jihoon Kim 666e2f66eb ecore_imf_example: notify the cursor information in focus-in handler 2013-10-11 10:23:19 +09:00
U. Artie Eoff 1389dde258 examples/ecore: don't use ECORE_CON_LIBS
We can't use ECORE_CON_LIBS at the examples/ "make" context
since it defines libraries relative to the src/ directory
(e.g. lib/ecore/libecore.la).  Use ECORE_CON_COMMON_LDADD instead.

This fixes the following link error with ecore_fd_handler_gnutls_example
when the project is configured with --with-crypto=gnutls:

libtool: link: cannot find the library `lib/ecore/libecore.la'

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-10-01 13:53:29 -07:00
U. Artie Eoff 403a487e44 examples/ecore: ecore_pipe_gstreamer_example must go in HAVE_GSTREAMER guard
Only specify ecore_pipe_gstreamer_example in EXTRA_PROGRAMS inside the
HAVE_GSTREAMER makefile guard.

Fixes: https://phab.enlightenment.org/T423

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-10-01 13:46:57 -07:00
Cedric Bail f3db01a16e edje: make min: source work correctly with GROUP part.
This close task T54.
2013-08-07 16:04:52 +09:00
Daniel Willmann 03e0754412 ecore example: Disable ecore_audio examples while Eo is in flux
There is no legacy API we could use here, so just disable building for
now.
2013-07-24 08:57:05 +02:00
Daniel Willmann 8a5bda1523 ecore examples: Use old API as long as Eo is in flux
This avoids build errors while Eo/Eo2 is being moved around.
2013-07-24 08:57:05 +02:00
Cedric Bail 072501c882 edje: add threshold to draggable part. 2013-07-19 15:40:11 +09:00
Stefan Schmidt d204e20afc examples: Add missing Ecore_Eo.h for some defines.
If we are shuffling headers around testing if in-tree examples are
still working fine might be a sensible thing to do. Everybody agrees
on that?
2013-07-11 09:44:44 +01:00
José Roberto de Souza 5e142a43ec eldbus: Handle removal of last reference of connection inside of callback 2013-07-05 16:08:01 -03:00
Eduardo Lima (Etrunko) 71d66346a6 Updated Eldbus connect_address example
See description on the header of the source file

Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-07-04 17:23:52 -03:00
Sebastian Dransfeld e2189e8135 efl: formatting 2013-06-20 13:08:36 +02:00
Tom Hacohen 361cf88d04 Edje examples: Fixed knob to be visible in the drag example. 2013-06-12 14:06:27 +01:00
Eduardo Lima (Etrunko) f67a0fcad7 Split .gitignore into multiple files
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-06-11 18:18:50 -03:00
Jérémy Zurcher 79470435e2 Makefile: compilation succed without png support
use --enable-image-loader-png=no
related to T64 and D133
2013-05-30 23:47:35 +02:00
Eduardo Lima (Etrunko) 60d2e02d7d Example for eldbus_address_connection_get() functions
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
2013-05-28 09:42:29 -03:00
Rafael Antognolli b5e1876d1e evas/examples: Adding an example for multi-touch. 2013-05-08 16:56:11 -03:00
José Roberto de Souza 20de153e95 eldbus: Add eldbus_message_iter_fixed_array_append() 2013-05-04 10:38:55 -03:00
Daniel Willmann cb3f50d19c eina/evas: Fix includes for examples
Some examples are still missing includes
2013-04-25 00:11:06 +01:00
Carsten Haitzler a73b21f13f fix examples makefiles to find Efl_Config.h 2013-04-25 02:08:49 +09:00
Daniel Willmann 9b88fb4d39 examples/ecore_audio: Require input and output file as argument
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-23 17:13:39 +01:00
Daniel Willmann 339fd52989 ecore_audio: Add more return values for methods, catch up with API
input_attach, input_detach, format_set, and source_set now return an
Eina_Bool

Tests, examples and edje_multisense adapted

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-23 17:13:39 +01:00
Lucas De Marchi d5313371de Rename edbus->eldbus
git grep -l edbus2 | while read f; do sed -i 's/edbus2/eldbus/g' "$f"; done
find . -name '*edbus2*' -exec rename edbus2 eldbus {} \;

git grep -l "EDBUS" | while read f; do sed -i 's/EDBUS/ELDBUS/g' "$f"; done
git grep -l "EDBus" | while read f; do sed -i 's/EDBus/Eldbus/g' "$f"; done
git grep -l "edbus (v2)" | while read f; do sed -i 's/edbus (v2)/eldbus/g' "$f"; done
git grep -l "Edbus" | while read f; do sed -i 's/Edbus/Eldbus/g' "$f"; done
git grep -l "edbus" | while read f; do sed -i 's/edbus/eldbus/g' "$f"; done

find . -name '*edbus*' -exec rename edbus eldbus {} \;
find . -name '*EDBus*' -exec rename EDBus Eldbus {} \;
2013-04-23 12:36:29 -03:00
Daniel Willmann 91fe8d97bc ecore_audio: Fix warnings
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:34:33 +01:00
Daniel Willmann 49403e9659 ecore_audio: Add return value to input_attach method
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:32:46 +01:00
Daniel Willmann ee3ea49cfa ecore_audio: Make custom input example work with eo
Uses VIO to implement a custom read function

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:16:38 +01:00
Daniel Willmann 1de5d3cd23 ecore_audio: Implement ecore_audio_playback example with eo
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:15:37 +01:00
Daniel Willmann 575069ae18 ecore_audio: Update transcoding example to work with eo
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:14:25 +01:00
Daniel Willmann 79bc257a60 ecore_audio: Build Eo-based Ecore_Audio and tests now
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-18 19:12:17 +01:00
Igor Murzov e29dec1793 Fix incorrect printf format usage 2013-04-16 12:07:36 +04:00
Rafael Antognolli 7ec690ee07 ecore/wayland: Fix screen geometry when it is rotated.
Width and height should be swapped when the screen is rotated by 90 or
270 degrees.

Additionally, add a command to the ecore_evas_window_sizes_example which
returns the screen geometry.
2013-04-02 17:27:39 -03:00
Daniel Willmann 9728b2679a ecore_audio_playback: Support changing of speed
Implement ecore_audio_input_speed_set() in playback example
Fix volume limit off-by-one check while I'm at it

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-02 16:26:47 +01:00
Stefan Schmidt 3daf67a4ba eina/examples: Return in a non-void function.
Reported by Simotek. Thanks!
2013-03-28 10:56:05 +00:00
Tom Hacohen 52dd8953ea Eina examples: Fixed eina magic example.
Return a value in the "new" function...
2013-03-26 11:24:17 +00:00
Cedric Bail b46016141d edje: work also when not cross compiling. 2013-03-24 23:44:04 +09:00
Cedric Bail 1732270f0c edje: add option to enable theme compilation when cross compiling 2013-03-24 22:59:44 +09:00
Rafael Antognolli b58ee5181d evas/examples: Fix clipped smart object show/hide example.
Make the children get clipped to its smart object's clipper, so there's
no need to reimplement smart_show() and smart_hide() methods.
2013-03-22 15:31:21 -03:00
Tom Hacohen 67bebcc226 Change usage of eo_do_super to the new prototype. 2013-03-18 16:14:18 +00:00
Jihoon Kim 83fde2e42f ecore_imf_example: call ecore_imf_context_filter_event in mouse up/down event 2013-02-23 18:01:10 +09:00
Jihoon Kim fc4d74617d ecore_imf_example: remove unused variable, fix warning 2013-02-23 17:59:29 +09:00
Jiyoun Park 89be30b2b3 ecore evas extn:add example file related with ecore extn
It can be used to see the function of ecore extn and msg send/recieve
2013-02-16 18:02:40 +09:00
Tom Hacohen 5a8bfea09b Revert "Fix build break"
This doesn't really fix build break, it actually breaks it.

This reverts commit e655f0b7358765f02ea392971c6ddbf8518c37c8.
2013-02-15 16:19:35 +00:00
Jaehwan Kim 310834a5b2 Fix build break 2013-02-15 20:15:58 +09:00
Jiyoun Park 2ccc13696a Add infrastructure to handle message between ecore and parent ecore in Ecore_Evas
I add new example related with this. (ecore_evas_extn_socket & plug example)
ecore extn use this infrasturcture, server app and client app can communicate each other
later, this can be used to contorl access message


SVN revision: 83942
2013-02-15 09:32:40 +00:00
Ricardo de Almeida Gonzaga 4f3ca3efcd efl: add makefile.examples to each lib
Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>



SVN revision: 83795
2013-02-08 17:35:24 +00:00
Ricardo de Almeida Gonzaga e2dae9a49e efl: add and fix some gcc lines and fix some examples. Its not possible to build from outside the directory with eina_prefix, the build still depends on PACKAGE_DATA_DIR
Patch by: Ricardo de Almeida Gonzaga <ricardo@profusion.mobi>



SVN revision: 83794
2013-02-08 17:35:17 +00:00
Jihoon Kim 4b966d4a2c ecore_imf_example: add ecore_imf_context_reset in mouse down event callback
SVN revision: 83341
2013-01-26 03:30:16 +00:00
Jihoon Kim b215a6dd81 ecore_imf_example: add parameter NULL checking
SVN revision: 83340
2013-01-26 03:01:12 +00:00
Jihoon Kim a410c32691 ecore_imf_example: fix comment style
SVN revision: 83339
2013-01-26 02:58:50 +00:00
Jihoon Kim b02a592528 ecore_imf_example: add mouse down event handler
SVN revision: 83338
2013-01-26 02:49:39 +00:00
Jihoon Kim 917b131ee3 ecore_imf: fix typo in ecore_imf_example.c
SVN revision: 83002
2013-01-19 06:18:31 +00:00
Gustavo Sverzut Barbieri 4e9f2eaaf9 fix DSO spotted by stefan
SVN revision: 82982
2013-01-18 14:45:44 +00:00
Gustavo Sverzut Barbieri 04066fdb89 fix distcheck.
it was failing:
 - leaving missing objects (.edj, .la)
 - eo was not building its examples automatically with --enable-always-build-examples
 - make dist with '--enable-always-build-examples' was not including 'src/examples'

plus lots of ignored files due test changes.



SVN revision: 82894
2013-01-16 18:28:43 +00:00
Gustavo Sverzut Barbieri b2eba6e2b4 fix examples builds with recent module split.
ecore examples should be split... but I'm not in the mood to do so.



SVN revision: 82839
2013-01-15 19:27:48 +00:00
Gustavo Sverzut Barbieri b2ceb059a8 fix directory structure: move ethumd_client out of ethumb.
it's another library, do not mix stuff as it used to be.




SVN revision: 82835
2013-01-15 18:10:58 +00:00
Tom Hacohen 23cf059b23 Eina examples: Fixed unused parameter warnings.
SVN revision: 82829
2013-01-15 17:18:40 +00:00
Lucas De Marchi 57cf1ac7ef efl/edbus: make all edbus_*_send() methods unref its msg
There's no reason to keep a msg after it was sent. Before this patch we
had edbus_service_signal_send() unref'ing its msg and all the others
not. Also, several users (particularly the edbus_proxy_send() ones) were
forgetting to unref the msg.

This patch makes all these methods unref the message after it has been
succesfully sent:

 - edbus_connection_send()
 - edbus_object_send()
 - edbus_proxy_send()
 - edbus_service_signal_send()



SVN revision: 82807
2013-01-15 14:33:48 +00:00
Gustavo Sverzut Barbieri 847b831002 clean up benchmark and example rules.
- they have no 'all' rule, keep out of SUBDIRS

 - they depend on 'all-am', the non-recursive target that builds everything.

 - they do not need a directory on its own to declare nothing.x



SVN revision: 82689
2013-01-12 07:38:26 +00:00
Gustavo Sverzut Barbieri 66791fc191 turn on automake warnings and fix them.
using their recommended way to implement silent rules.


SVN revision: 82686
2013-01-12 06:50:35 +00:00
Gustavo Sverzut Barbieri 694eefedb6 missing file.
SVN revision: 82678
2013-01-12 04:30:57 +00:00
Gustavo Sverzut Barbieri 24537f9c8b efl/ethumb: the test is actually an example.
SVN revision: 82676
2013-01-12 03:59:25 +00:00
Gustavo Sverzut Barbieri 9c66145044 efl: fix out-of-tree build of examples.
edje and embryo include files are in source dir, not build.

codegen example must have dependency to build in correct order :-/



SVN revision: 82605
2013-01-11 03:57:29 +00:00
Gustavo Sverzut Barbieri 18f0e57f27 efl: merge emotion.
this one was quite a huge work, but hopefully it's correct.

NOTES:
 * removed vlc generic module, it should go into a separate package.
 * gstreamer is enabled by default (see --disable-gstreamer)
 * xine is disabled by default (see --enable-gstreamer)
 * generic is always built statically if supported
 * gstreamer and xine can't be configured as static (just lacks command line options, build system supports it)
 * v4l2 is enabled by default on linux if eeze is built (see --disable-v4l2)
 * emotion_test moved to src/tests/emotion and depends on EFL_ENABLE_TESTS (--with-tests), but is still installed if enabled.

TODO (need your help!):
 * fix warnings with gstreamer and xine engine
 * call engine shutdown functions if building as static
 * remove direct usage of PACKAGE_*_DIR and use eina_prefix
 * add eina_prefix checkme file as evas and others
 * add support for $EFL_RUN_IN_TREE
 * create separate package for emotion_generic_modules
 * check docs hierarchy (doxygen is segv'in here)



SVN revision: 82501
2013-01-10 03:43:32 +00:00
Daniel Juyung Seo 768ebc01f4 ecore ecore_fd_handler_example.c: Added gcc build instruction for an example.
SVN revision: 82356
2013-01-07 17:04:18 +00:00
Gustavo Sverzut Barbieri f7679697c6 efl: distcheck will run tests and compile all examples.
Tests are disabled by default, but they should be mandatory for
distcheck. So should be examples, we should have them to at least
compile.

As there is no way to force "make distcheck" to run "make examples",
I've created --enable-always-build-examples to make examples regular
noinst_PROGRAMS, being always compiled. distcheck will use that
option.



SVN revision: 82276
2013-01-05 14:41:14 +00:00
Gustavo Sverzut Barbieri dc409bc596 efl/edje: codegen shouldn't use BUILT_SOURCES.
if use BUILT_SOURCES it will always generate those files, and their
requirement codegen.edj, even if examples were not to be built.

make will automatically build the files if there are rules to do so,
we just have to clean them.



SVN revision: 82275
2013-01-05 14:38:32 +00:00
Gustavo Sverzut Barbieri 62ee2c0952 efl/ecore: hopefully fix all examples.
SVN revision: 82243
2013-01-04 23:51:53 +00:00
Gustavo Sverzut Barbieri 852653c0a9 efl: fix make dist.
Carefully compared 'svn export' and 'make dist' results and couple of
files were missing.

Changes:

 * Makefile.am: removed all .pc from EXTRA_DIST, we shouldn't
   distribute them here as they will contain ./configure data such as
   install location.
 * src/Makefile.am: moved all if-endif to files, otherwise EXTRA_DIST
   won't work properly. We must EXTRA_DIST outside of the if-endif
   block.
 * static_libs/liblinebreak: removed couple of unused files.




SVN revision: 82241
2013-01-04 20:55:12 +00:00
Gustavo Sverzut Barbieri e8d06999cb efl/edje: fix examples to not build EDJ during regular install
do not use standard files_DATA and filesdir as they would always be
executed during compilation.



SVN revision: 82223
2013-01-04 18:25:43 +00:00
Gustavo Sverzut Barbieri 54791bd20c efl: simplify examples handling.
SVN revision: 82222
2013-01-04 18:24:41 +00:00
Gustavo Sverzut Barbieri 446193dc1b efl: make libraries aware of EFL_RUN_IN_TREE.
this variable tells that the build is being done in tree and we should
not look at install locations.



SVN revision: 82217
2013-01-04 17:19:43 +00:00
José Roberto de Souza 7bbfd3c7d9 edbus: Remove unused parameter warning of edbus examples
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>



SVN revision: 82213
2013-01-04 16:44:06 +00:00
Cedric BAIL 90ef6b8102 efl: draah, edje example don't follow the rest of efl example. so shut it down.
SVN revision: 82168
2013-01-04 10:36:54 +00:00
Cedric BAIL 89459d566e efl: the problem is edje not ephysics.
SVN revision: 82166
2013-01-04 10:24:00 +00:00
Cedric BAIL 247ba9c1f5 efl: disable build of ephysics example as we can't build them on a clean machine.
NOTE: this is just the bootstrap issue we have been warning about.


SVN revision: 82165
2013-01-04 10:14:55 +00:00
Gustavo Sverzut Barbieri c3e6d08e84 efl: merge edje.
this is still in progress, mostly the multisense stuff is pending.

it seems that when we merge ecore_audio in edje the libremix and
similar are gone, at least from Edje, and will be in ecore_audio
itself (or pulseaudio).

Changes:
 * __UNUSED__ to EINA_UNUSED
 * binaries (epp, embryo_cc, edje_cc) now consider EFL_RUN_IN_TREE and
   will assume the binaries are still not installed, running from
   build tree location (needs more testing, maybe doesn't work with
   srcdir != builddir, still doesn't solve cross compile builds)



SVN revision: 82139
2013-01-04 02:08:14 +00:00
Gustavo Sverzut Barbieri 3a71961f2b efl/ephysics: quiet warning
SVN revision: 82133
2013-01-04 00:03:56 +00:00
Gustavo Sverzut Barbieri ae4fb6f96f efl: merge ephysics
changes:
 * __UNUSED__ -> EINA_UNUSED
 * Fixed doc hierarchy



SVN revision: 82126
2013-01-03 22:10:40 +00:00
Rafael Antognolli c2dbeffd76 ecore/examples: Add PACKAGE_EXAMPLES_DIR to ecore examples too.
SVN revision: 82064
2013-01-03 12:04:32 +00:00
Gustavo Sverzut Barbieri a7006061b2 efl/eio: use eina_file_copy()
SVN revision: 81944
2012-12-31 23:45:24 +00:00
Gustavo Sverzut Barbieri a06b26817c efl: add eina_file_copy()
it's useful to copy file from one place to another and this will be
used in eio' s implementation.

NOTE: did not use mmap here as mmap faults may be cumbersome to handle
(Eina_File itself does that, but in a nasty way) and the
implementation would be severely different as there is no Eina_File
from FD, and there is no way to inject custom memory/fd into the
Eina_File's fault handling. The performance would not be that
different anyways and the splice() is already in there for systems
with good performance (read: Linux).



SVN revision: 81942
2012-12-31 23:17:18 +00:00
Gustavo Sverzut Barbieri 65012fa66d efl: missing api for xattr.
SVN revision: 81941
2012-12-31 21:05:58 +00:00
Gustavo Sverzut Barbieri 22cac2a911 efl/evas: add ecore-evas dependent examples.
nice feature of single tree efl is that evas examples can use ecore-evas :-)



SVN revision: 81919
2012-12-31 01:40:50 +00:00
Gustavo Sverzut Barbieri 9fbfcad590 efl: refactor CFLAGS, LIBS, LIBADD and LDADD usage.
- remove EFL_LIBS and EFL_CFLAGS, use per-lib values that inherit
   from EFL (general)

 - add NAME_LDFLAGS and EFL_LDFLAGS for linker flags.

 - LDADD (binaries) now use NAME_LDFLAGS instead of NAME_LIBS, as they
   link to libname.la and that will pull in the libtool dependencies



SVN revision: 81915
2012-12-31 00:46:14 +00:00
Gustavo Sverzut Barbieri 75416eb3a7 efl: merge edbus (v2).
SVN revision: 81825
2012-12-28 17:53:25 +00:00
Gustavo Sverzut Barbieri c9112a69be efl/src/examples/eio: fixed typo.
SVN revision: 81814
2012-12-28 15:59:12 +00:00
Yakov Goldberg 3c5a7f0b65 evas: fixing example
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>

SVN revision: 81359
2012-12-19 13:45:02 +00:00
Yakov Goldberg 5ab04648d9 evas: Eo-styled Evas example added.
Signed-off-by: Yakov Goldberg <yakov.g@samsung.com>

SVN revision: 81328
2012-12-19 09:13:08 +00:00
Daniel Willmann 17b97ca074 ecore_audio: Add an example for libsndfile output: ogg encoder
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 81003
2012-12-14 23:38:35 +00:00
Daniel Willmann a87ab2f265 ecore_audio: Example for user generated sounds
Uses the custom function support, which can probably be improved

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 81002
2012-12-14 23:38:31 +00:00
Daniel Willmann 2a8cf46e99 ecore_audio: Add an example - a simple CLI music player
Give it sound files (ogg, wav, not mp3) as parameter or

"tone:freq=<f>,duration=<dur_in_s>" to play a lovely sine wave

* '<' and '>' seek forward and backward
* '+' and '-' change the volume
* Space toggles pause
* Shows information for the song (remaining, %)
* (Un)loop a song with 'l'
* 'n' - Next song
* 'm' - Next song simultaneous to current
* Volume can be set from 0 - 150%

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 81001
2012-12-14 23:38:28 +00:00
Vincent Torri 2b6bc567db add eio example and fix ecore_fb linking
SVN revision: 80273
2012-12-05 18:10:43 +00:00
Daniel Willmann 44dfc6a3e3 Make ecore examples compile again
Including ECORE_LIBS in LDADD is not enough, we have to include the
relevant libs from efl as well (eina, evas, ...)

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 80260
2012-12-05 15:28:10 +00:00
Vincent Torri 79ee9acc32 Ecore: fix subdirs (aka : to test, do not compile while being in the subdir, but at the top level dir...)
SVN revision: 80129
2012-12-04 07:23:43 +00:00
Vincent Torri 4eeead531d Ecore: add examples
SVN revision: 80097
2012-12-03 19:36:16 +00:00
Daniel Willmann c436bac0c9 Remove binary character in Makefile.am
This caused automake to generate a faulty Makefile, which in turn caused
compilation to fail.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 79345
2012-11-15 13:28:14 +00:00
Vincent Torri 6a99b0f753 merge: add evas tests and examples
SVN revision: 79300
2012-11-14 20:12:53 +00:00
Vincent Torri aaebe046bf merge: pass directly to the preprocessor the Windows macro instead of using autotools
SVN revision: 78350
2012-10-23 05:43:57 +00:00
Gustavo Sverzut Barbieri 55dc44d246 efl: eet and eo are now mandatory.
I've reordered the build to be: eina -> eo -> eet as it make more sense.



SVN revision: 77766
2012-10-10 17:27:11 +00:00
Vincent Torri 3ea9fd1c9e merge: __UNUSED__ --> EINA_UNUSED and some fixes in eo.
SVN revision: 77542
2012-10-05 20:09:47 +00:00
Cedric BAIL 3ddf7ef3e7 efl: backport Igor's eina patch.
SVN revision: 77415
2012-10-04 09:31:46 +00:00
Vincent Torri e3efa70e05 Eo IS optional. Sorry, i will fight to have ALL libs being optional
SVN revision: 77126
2012-09-27 04:46:30 +00:00
Carsten Haitzler caeca5e340 make eo not an optional build - this WILL be no-option as we will be
based on it.



SVN revision: 77124
2012-09-27 04:39:28 +00:00
Carsten Haitzler 8ed253ec97 and more include dir fixes.
SVN revision: 77122
2012-09-27 04:14:38 +00:00
Carsten Haitzler 99ba29ec26 make make examples work with dso linking unhappiness.
SVN revision: 77111
2012-09-27 03:22:34 +00:00
Vincent Torri 30f1c531ec merge: add eo
SVN revision: 77072
2012-09-26 06:56:52 +00:00
Vincent Torri af4359f59b merge: clean generated examples
SVN revision: 77050
2012-09-25 08:23:06 +00:00
Vincent Torri 651f92a08f merge: minor fix
SVN revision: 77045
2012-09-25 08:01:31 +00:00
Vincent Torri 5fd435d62a merge : remove useless CONDITIONALs and make eet build optional; eina is always built
SVN revision: 77026
2012-09-23 19:56:44 +00:00
Vincent Torri e415830903 merge: use $(MAKE) $(AM_MAKEFLAGS) and not just make. Fix benchmark-e17 rule
SVN revision: 77008
2012-09-22 06:44:32 +00:00
Vincent Torri 8822f5884b merge: "fix" distcheck
I can't be sure that distcheck is fixed as the check of eet is failing.
I've disable the run of the eina test for now as it is *very* long. I'll
re-enable it once eet check is running flawlessly



SVN revision: 76772
2012-09-17 17:17:55 +00:00
Vincent Torri 124b005889 merge: add eet
SVN revision: 76768
2012-09-17 16:35:38 +00:00
Vincent Torri 6529a052d9 merge: and the eina examples
SVN revision: 76715
2012-09-16 21:15:43 +00:00
821 changed files with 133291 additions and 1286 deletions

7
.arcconfig Normal file
View File

@ -0,0 +1,7 @@
{
"project_id" : "examples",
"projects" : "examples",
"conduit_uri" : "https://phab.enlightenment.org/",
"phabricator.uri" : "https://phab.enlightenment.org/",
"repository.callsign" : "examples"
}

4
.gitignore vendored
View File

@ -1,3 +1,5 @@
build
*.pot
.*.swp
subprojects
/meson.build

17
README
View File

@ -19,3 +19,20 @@ the appropriate steps automatically.
Directory naming is <type>/<language>/<name> please be careful to
namespace example binaries in case they are installed by the user.
Building the whole set of Examples
==================================
You can build all examples at once, all you have to do is:
./setup.py
This will create a folder called subprojects, all examples are
then sym-linked into this directory, a corresponding meson.build
file is generated, which uses every example as a subproject.
After that you can build the meson project with:
* mkdir build
* meson build/
* cd build
* ninja all

View File

@ -1,5 +1,5 @@
project(
'efl-example-focus', 'c',
'efl-example-calculator', 'c',
version : '0.0.1',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.38.0')

View File

@ -0,0 +1,212 @@
#define EFL_BETA_API_SUPPORT 1
#include <Elementary.h>
#include <Efl_Ui.h>
static Efl_Ui_Textbox *_screen = NULL; // Text widget showing current value
static int _prev_value = 0; // Value introduced before an operation (first operand
static int _curr_value = 0; // Value currently being introduced (second operand)
static char _operation = '='; // Last operation button pressed
static Eina_Bool _must_overwrite = EINA_FALSE; // Whether next number must be appended to current input
// or overwrite it
// Quits the application
static void
_gui_quit_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
efl_exit(0);
}
// Performs "operation" on "currValue" and "prevValue" and leaves result in "currValue"
static void
_operate()
{
switch (_operation)
{
case '+':
_curr_value += _prev_value;
break;
case '-':
_curr_value = _prev_value - _curr_value;
break;
case '*':
_curr_value *= _prev_value;
break;
case '/':
_curr_value = _prev_value / _curr_value;
break;
default:
break;
}
}
// Called every time a button is pressed
static void
_button_pressed_cb(void *data, const Efl_Event *event EINA_UNUSED)
{
char button = ((const char *)data)[0];
// If it is a number, append it to current input (or replace it)
if (button >= '0' && button <= '9')
{
char str[2] = { button, '\0' };
if (_must_overwrite)
{
efl_text_set(_screen, "");
_must_overwrite = EINA_FALSE;
}
Efl_Text_Cursor_Object *cursor = efl_text_interactive_main_cursor_get(_screen);
efl_text_cursor_object_text_insert(cursor, str);
}
else
{
char str[32] = "";
// No need to sanitize these values, so do not emit "text changed" events
efl_event_freeze(_screen);
switch (button)
{
case 'C':
// Clear current input
efl_text_set(_screen, "0");
break;
case '+':
case '-':
case '*':
case '/':
case '=':
// If there was a pending operation, perform it
if (_operation != '=')
{
_operate();
snprintf(str, sizeof(str), "%d", _curr_value);
efl_text_set(_screen, str);
}
// Store this operation
_operation = button;
_must_overwrite = EINA_TRUE;
_prev_value = _curr_value;
break;
default:
break;
}
efl_event_thaw(_screen);
}
}
// Called every time the content of the screen changes
// We use it to sanitize input (remove leading zeros, for example)
// This makes more sense when the Text widget is editable, since the user
// is free to type anything.
static void
_screen_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
char _text[32] = "";
const char *str = efl_text_get(_screen);
int d;
if ((strcmp(str, "") == 0) || (strcmp(str, "-") == 0))
{
snprintf(_text, sizeof(_text), "0");
}
else if (sscanf(str, "%d", &d) == 1)
{
snprintf(_text, sizeof(_text), "%d", d);
_curr_value = d;
}
if (strncmp(_text, str, sizeof(_text)))
{
// Avoid infinite recursion when setting the text from the
// "text changed" callback
efl_event_freeze(_screen);
efl_text_set(_screen, _text);
efl_event_thaw(_screen);
}
}
// Creates an Efl.Ui.Button and positions it in the given position inside the table
// The button text is colored with "r, g, b"
// "text" is what is drawn on the button, which might be a multi-byte unicode string.
// "command" is a single-char id for the button.
static void
_button_add(Efl_Ui_Table *table, const char *text, const char *command, int posx, int posy, int r, int g, int b)
{
Efl_Ui_Button *button =
efl_add(EFL_UI_BUTTON_CLASS, table,
efl_pack_table(table, efl_added, posx, posy, 1, 1),
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _button_pressed_cb, command));
// Buttons can only have simple text (no font, styles or markup) but can swallow
// any other object we want.
// Therefore we create a more complex Efl_Ui_Text object and use it as content for the button.
Efl_Ui_Textbox *label =
efl_add(EFL_UI_TEXTBOX_CLASS, button,
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_text_horizontal_align_set(efl_added, 0.5),
efl_text_vertical_align_set(efl_added, 0.5),
efl_gfx_color_set(efl_added, r, g, b, 255),
efl_text_set(efl_added, text));
efl_text_font_family_set(label, "Sans");
efl_text_font_size_set(label, 36);
efl_content_set(button, label);
}
// Creates the UI
static void
_gui_setup()
{
Eo *win, *table;
// The window
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "EFL Calculator"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// when the user clicks "close" on a window there is a request to delete
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
// The table is the main layout
table = efl_add(EFL_UI_TABLE_CLASS, win,
efl_content_set(win, efl_added),
efl_pack_table_size_set(efl_added, 4, 5),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(300, 400)));
// Create all buttons using the _button_add helper
_button_add(table, "1", "1", 0, 3, 255, 255, 255);
_button_add(table, "2", "2", 1, 3, 255, 255, 255);
_button_add(table, "3", "3", 2, 3, 255, 255, 255);
_button_add(table, "4", "4", 0, 2, 255, 255, 255);
_button_add(table, "5", "5", 1, 2, 255, 255, 255);
_button_add(table, "6", "6", 2, 2, 255, 255, 255);
_button_add(table, "7", "7", 0, 1, 255, 255, 255);
_button_add(table, "8", "8", 1, 1, 255, 255, 255);
_button_add(table, "9", "9", 2, 1, 255, 255, 255);
_button_add(table, "0", "0", 1, 4, 255, 255, 255);
_button_add(table, "+", "+", 3, 1, 128, 128, 128);
_button_add(table, "", "-", 3, 2, 128, 128, 128);
_button_add(table, "×", "*", 3, 3, 128, 128, 128);
_button_add(table, "÷", "/", 3, 4, 128, 128, 128);
_button_add(table, "=", "=", 2, 4, 128, 128, 128);
_button_add(table, "C", "C", 0, 4, 0, 0, 0);
// Create a big Efl.Ui.Textbox screen to display the current input
_screen = efl_add(EFL_UI_TEXTBOX_CLASS, table,
efl_text_set(efl_added, "0"),
efl_text_multiline_set(efl_added, EINA_FALSE),
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
efl_pack_table(table, efl_added, 0, 0, 4, 1),
efl_text_horizontal_align_set(efl_added, 0.9),
efl_text_vertical_align_set(efl_added, 0.5),
efl_text_effect_type_set(efl_added, EFL_TEXT_STYLE_EFFECT_TYPE_GLOW),
efl_text_glow_color_set(efl_added, 128, 128, 128, 128),
efl_event_callback_add(efl_added, EFL_UI_TEXTBOX_EVENT_CHANGED,
_screen_changed_cb, NULL));
efl_text_font_family_set(_screen, "Sans");
efl_text_font_size_set(_screen, 48);
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
_gui_setup();
}
EFL_MAIN()

View File

@ -1,10 +1,10 @@
src = files([
'focus_main.c',
'calculator.c',
])
deps = [eina, efl, elm]
executable('efl_example_focus', src,
executable('efl_example_calculator', src,
dependencies : deps,
include_directories : inc,
install : true

View File

@ -0,0 +1,13 @@
project(
'efl-example-homescreen', 'c',
version : '0.0.1',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.38.0')
eina = dependency('eina', version : '>=1.20.99')
efl = dependency('efl-ui', version : '>=1.20.99')
elm = dependency('elementary', version : '>=1.20.99')
inc = include_directories('.')
subdir('src')

Binary file not shown.

View File

@ -0,0 +1,311 @@
#define EFL_BETA_API_SUPPORT
#include <Efl_Ui.h>
#include <Eio.h>
#define TABLE_COLUMNS 4
#define TABLE_ROWS 5
typedef struct _Build_Data
{
Eo *over_container;
Efl_Io_Manager *io_manager;
Eo *table;
int x, y;
} Build_Data;
static const char *launcher_apps[][3] =
{ { "Call", "", "call-start" },
{ "Contacts", "", "contact-new" },
{ "Home", "xdg-open $HOME", "user-home" },
{ "Mail", "xdg-email 'info@enlightenment.org'", "mail-send-receive" },
{ "Documents", "xdg-open $(xdg-user-dir DOCUMENTS)", "folder-documents" } };
static void
_icon_clicked_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
const char *command = data;
printf("%s\n", command);
efl_add(EFL_EXE_CLASS, efl_main_loop_get(),
efl_core_command_line_command_string_set(efl_added, command),
efl_task_run(efl_added));
}
static void
_icon_deleted_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
free(data);
}
// If "string" begins with the "key" prefix, sets "value" to whatever comes after "key"
// up until the next \n, replacing it with a \0, in a newly allocated string
// (which must be freed).
// Returns 1 if key was found.
static int
_parse_token(const char *string, const char *key, char **value)
{
if (eina_str_has_prefix(string, key))
{
int key_len = strlen(key);
const char *end = strchr(string + key_len, '\n');
if (!end)
end = string + strlen(string); // Point to EOF '\0'
int len = end - string - key_len;
if (*value) free(*value);
*value = eina_strndup(string + key_len, len + 1);
*((*value) + len) = '\0';
return 1;
}
return 0;
}
// Reads a .desktop file and returns the app name, the command to launch and the icon name.
// Returns 0 if it didn't work.
// Free the strings after usage.
static int
_parse_desktop_file(const char *desktop_file_path, char **app_name, char **app_command, char **app_icon_name)
{
EINA_RW_SLICE_DECLARE(slice, 1024);
Efl_Io_File *desktop_file;
int ret = 0;
desktop_file = efl_new(EFL_IO_FILE_CLASS,
efl_file_set(efl_added, desktop_file_path),
efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE));
if (!desktop_file)
return 0;
char *name = NULL, *command = NULL, *icon = NULL, *onlyshow = NULL, *nodisplay = NULL;
while (!efl_io_reader_eos_get(desktop_file) &&
efl_io_reader_read(desktop_file, &slice) == EINA_ERROR_NO_ERROR)
{
char *content = eina_rw_slice_strdup(slice);
char *ptr = content;
while ((ptr = strchr(ptr, '\n')))
{
ptr++;
_parse_token(ptr, "Name=", &name);
_parse_token(ptr, "Exec=", &command);
_parse_token(ptr, "Icon=", &icon);
_parse_token(ptr, "OnlyShowIn=", &onlyshow);
_parse_token(ptr, "NoDisplay=", &nodisplay);
}
free(content);
}
if (name && command && icon && !onlyshow && (!nodisplay || eina_streq(nodisplay, "false")))
{
*app_name = name;
*app_command = command;
*app_icon_name = icon;
ret = 1;
}
else
{
if (name)
free(name);
if (command)
free(command);
if (icon)
free(icon);
}
if (onlyshow)
free(onlyshow);
if (nodisplay)
free(nodisplay);
efl_unref(desktop_file);
return ret;
}
// Creates a widget "button" with the specified name, icon and command
// to execute on click.
// These buttons are actually just an image with a label below.
static Efl_Ui_Widget *
_create_icon(Eo *parent, const char *name, const char *command, const char *icon)
{
Eo *box = efl_add(EFL_UI_BOX_CLASS, parent);
// Icon
efl_add(EFL_UI_IMAGE_CLASS, box,
efl_ui_image_icon_set(efl_added, icon),
efl_gfx_hint_weight_set(efl_added, 1.0, 1.0),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(64, 64)),
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _icon_clicked_cb, command),
efl_event_callback_add(efl_added, EFL_EVENT_DEL, _icon_deleted_cb, command),
efl_pack(box, efl_added));
// Label
efl_add(EFL_UI_TEXTBOX_CLASS, box,
efl_text_set(efl_added, name),
efl_text_multiline_set(efl_added, EINA_TRUE),
efl_canvas_textblock_style_apply(efl_added,
"effect_type=soft_shadow shadow_color=#444 wrap=word font_size=10 align=center ellipsis=1"),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 40)),
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
efl_pack(box, efl_added));
return box;
}
// Creates a widget "button" for the specified .desktop file.
// These buttons are actually just an image with a label below.
static Efl_Ui_Widget *
_create_app_icon(Eo *parent, const char *desktop_file_path)
{
char *name = NULL, *command = NULL, *icon = NULL;
Eo *widget = NULL;
if (!_parse_desktop_file(desktop_file_path, &name, &command, &icon))
return NULL;
widget = _create_icon(parent, name, command, icon);
free(name);
free(icon);
return widget;
}
// Adds a new empty page to the homescreen
static void
_add_page(Build_Data *bdata)
{
bdata->table = efl_add(EFL_UI_TABLE_CLASS, bdata->over_container,
efl_pack_table_size_set(efl_added, TABLE_COLUMNS, TABLE_ROWS));
efl_pack_end(bdata->over_container, bdata->table);
bdata->x = bdata->y = 0;
}
// Adds all files in the array to the homescreen, adding pages as they become full.
static void
_app_found(void *data, Eina_Array *files)
{
unsigned int i;
const char *item;
Eina_Array_Iterator iterator;
Build_Data *bdata = data;
EINA_ARRAY_ITER_NEXT(files, i, item, iterator)
{
Eo *app = _create_app_icon(bdata->over_container, item);
if (app)
{
if (!bdata->table)
_add_page(bdata);
efl_pack_table(bdata->table, app, bdata->x, bdata->y, 1, 1);
bdata->x++;
if (bdata->x == TABLE_COLUMNS)
{
bdata->x = 0;
bdata->y++;
if (bdata->y == TABLE_ROWS)
bdata->table = NULL;
}
}
}
}
// Called when directory listing has finished
static Eina_Value
_file_listing_done_cb (void *data, const Eina_Value file, const Eina_Future *dead EINA_UNUSED)
{
Build_Data *bdata = data;
// Fill any remaining empty cells with invisible rectangles so the rest of the cells
// keep the same size as other pages
while (bdata->y < TABLE_ROWS)
{
while (bdata->x < TABLE_COLUMNS)
{
efl_add(EFL_CANVAS_RECTANGLE_CLASS, bdata->table,
efl_gfx_color_set(efl_added, 0, 0, 0, 0),
efl_pack_table(bdata->table, efl_added, bdata->x, bdata->y, 1, 1));
bdata->x++;
}
bdata->x = 0;
bdata->y++;
}
return file;
}
// Create Spotlight widget and start populating it with user apps.
static void
_build_homescreen(Efl_Ui_Win *win, Build_Data *bdata)
{
Efl_Ui_Spotlight_Indicator *indicator = efl_new(EFL_UI_SPOTLIGHT_ICON_INDICATOR_CLASS);
Efl_Ui_Spotlight_Manager *scroll = efl_new(EFL_UI_SPOTLIGHT_SCROLL_MANAGER_CLASS);
bdata->over_container = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, win,
efl_ui_spotlight_manager_set(efl_added, scroll),
efl_ui_spotlight_indicator_set(efl_added, indicator)
);
bdata->table = NULL;
Eina_Future *future = efl_io_manager_ls(bdata->io_manager, "/usr/share/applications", bdata, _app_found, NULL);
eina_future_then(future, _file_listing_done_cb, bdata, NULL);
}
// The main box, with an upper space for the apps list and a lower space
// for the quick-action buttons.
static Efl_Ui_Widget*
_build_overall_structure(Efl_Ui_Win *win, Efl_Ui_Widget *homescreen)
{
Efl_Ui_Widget *box, *start_line;
box = efl_add(EFL_UI_BOX_CLASS, win);
// Set box background
// Objects retrieved with efl_part() only survive one function call, so we ref it
Eo *background = efl_ref(efl_part(box, "background"));
efl_file_key_set(background, "e/desktop/background");
efl_file_set(background, "../src/Hills.edj");
efl_file_load(background);
efl_unref(background);
efl_pack_end(box, homescreen);
// Start line
start_line = efl_add(EFL_UI_BOX_CLASS, win,
efl_gfx_color_set(efl_part(efl_added, "background"), 128, 128, 128, 128));
efl_gfx_hint_weight_set(start_line, 1.0, 0.0);
efl_ui_layout_orientation_set(start_line, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
efl_pack_end(box, start_line);
for (unsigned int i = 0; i < sizeof(launcher_apps)/sizeof(launcher_apps[0]); ++i)
{
efl_pack_end(start_line, _create_icon(start_line,
launcher_apps[i][0],
strdup(launcher_apps[i][1]),
launcher_apps[i][2]));
}
return box;
}
// Called when the app is closed
static void
_gui_quit_cb(void *data, const Efl_Event *event EINA_UNUSED)
{
Build_Data *bdata = data;
if (bdata->io_manager)
efl_del(bdata->io_manager);
free(bdata);
efl_exit(0);
}
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
Eo *win, *desktop;
Build_Data *bdata = calloc (1, sizeof(Build_Data));
bdata->io_manager = efl_add(EFL_IO_MANAGER_CLASS, efl_main_loop_get());
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
// when the user clicks "close" on a window there is a request to delete
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, bdata);
_build_homescreen(win, bdata);
desktop = _build_overall_structure(win, bdata->over_container);
efl_content_set(win, desktop);
}
EFL_MAIN()

View File

@ -0,0 +1,11 @@
src = files([
'homescreen.c',
])
deps = [eina, efl, elm]
executable('efl_example_homescreen', src,
dependencies : deps,
include_directories : inc,
install : true
)

View File

@ -1,7 +1,5 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Elementary.h>
#include <Efl_Ui.h>
#include "life_private.h"
@ -67,7 +65,7 @@ life_board_run(Efl_Ui_Win *win)
_life_timer = efl_add(EFL_LOOP_TIMER_CLASS, efl_main_loop_get(),
efl_loop_timer_interval_set(efl_added, 0.1));
efl_event_callback_add(_life_timer, EFL_LOOP_TIMER_EVENT_TICK, _life_tick, win);
efl_event_callback_add(_life_timer, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _life_tick, win);
}
int

View File

@ -1,7 +1,5 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Elementary.h>
#include <Efl_Ui.h>
#include "life_private.h"
@ -49,19 +47,19 @@ _life_win_key_down(void *data EINA_UNUSED, const Efl_Event *event)
ev = event->info;
win = event->object;
if (!strcmp(efl_input_key_get(ev), "space"))
if (!strcmp(efl_input_key_sym_get(ev), "space"))
life_board_pause_toggle(win);
}
static Evas_Object *
static Efl_Ui_Win *
_life_win_setup(void)
{
Efl_Ui_Win *win;
Evas_Coord w;
Evas_Coord h;
int w;
int h;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "EFL Life"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
if (!win) return NULL;
@ -76,7 +74,7 @@ _life_win_setup(void)
life_render_init(win);
life_render_refresh(win);
efl_event_callback_add(win, EFL_GFX_ENTITY_EVENT_RESIZE, _life_win_resize, NULL);
efl_event_callback_add(win, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _life_win_resize, NULL);
efl_event_callback_add(win, EFL_EVENT_POINTER_DOWN, _life_win_touch, NULL);
efl_event_callback_add(win, EFL_EVENT_KEY_DOWN, _life_win_key_down, NULL);

View File

@ -1,7 +1,6 @@
#ifndef LIFE_PRIVATE_H_
# define LIFE_PRIVATE_H_
#include <Elementary.h>
#include <Efl_Ui.h>
#define LIFE_BOARD_WIDTH 47

View File

@ -1,7 +1,5 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Elementary.h>
#include <Efl_Ui.h>
#include "life_private.h"
@ -48,7 +46,7 @@ life_render_layout(Efl_Ui_Win *win)
{
Eina_Size2D size;
double cw, ch;
Evas_Object *rect;
Efl_Canvas_Rectangle *rect;
int x, y;
size = efl_gfx_entity_size_get(win);
@ -69,7 +67,7 @@ life_render_layout(Efl_Ui_Win *win)
void
life_render_cell(Efl_Ui_Win *win EINA_UNUSED, int x, int y)
{
Evas_Object *rect;
Efl_Canvas_Rectangle *rect;
int i;
i = life_render_index_for_position(x, y);

View File

@ -1,11 +1,9 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>
Efl_Ui_Text *_editor;
Efl_Ui_Textbox *_editor;
Efl_Ui_Button *_toolbar_new;
Eina_Bool _edited = EINA_FALSE;
@ -16,7 +14,7 @@ static void
_gui_new_clicked_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
{
efl_text_set(_editor, "");
_edited = EINA_TRUE;
_edited = EINA_FALSE;
_gui_toolbar_refresh();
}
@ -42,12 +40,12 @@ _gui_toolbar_button_add(Efl_Ui_Box *toolbar, const char *name,
button = efl_add(EFL_UI_BUTTON_CLASS, toolbar,
efl_text_set(efl_added, name),
efl_pack(toolbar, efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
func, efl_added));
efl_add(EFL_UI_IMAGE_CLASS, toolbar,
efl_ui_image_icon_set(efl_added, icon_name),
efl_content_set(efl_part(button, "elm.swallow.content"), efl_added));
efl_content_set(button, efl_added));
return button;
}
@ -59,15 +57,15 @@ _gui_toolbar_setup(Efl_Ui_Box *parent)
bar = efl_add(EFL_UI_BOX_CLASS, parent,
efl_pack(parent, efl_added),
efl_gfx_size_hint_weight_set(efl_added, 1, 0),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
efl_gfx_hint_weight_set(efl_added, 1, 0),
efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL));
_toolbar_new = _gui_toolbar_button_add(bar, "New", "document-new", _gui_new_clicked_cb);
// spacer box
efl_add(EFL_UI_BOX_CLASS, parent,
efl_pack(bar, efl_added),
efl_gfx_size_hint_weight_set(efl_added, 10, 0));
efl_gfx_hint_weight_set(efl_added, 10, 0));
_gui_toolbar_button_add(bar, "Quit", "application-exit", _gui_quit_cb);
_gui_toolbar_refresh();
@ -80,8 +78,8 @@ _gui_toolbar_refresh(void)
}
EFL_CALLBACKS_ARRAY_DEFINE(_editor_callbacks,
{ EFL_UI_TEXT_EVENT_CHANGED, _editor_changed_cb },
{ EFL_UI_TEXT_EVENT_CHANGED_USER, _editor_changed_cb });
{ EFL_UI_TEXTBOX_EVENT_CHANGED, _editor_changed_cb },
{ EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER, _editor_changed_cb });
static void
_gui_setup()
@ -89,7 +87,7 @@ _gui_setup()
Eo *win, *box;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Text Editor"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
@ -98,17 +96,18 @@ _gui_setup()
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
_gui_toolbar_setup(box);
_editor = efl_add(EFL_UI_TEXT_CLASS, box,
efl_text_font_set(efl_added, "Mono", 14),
_editor = efl_add(EFL_UI_TEXTBOX_CLASS, box,
efl_text_multiline_set(efl_added, EINA_TRUE),
efl_text_interactive_editable_set(efl_added, EINA_TRUE),
efl_ui_text_scrollable_set(efl_added, EINA_TRUE),
efl_event_callback_array_add(efl_added, _editor_callbacks(), NULL),
efl_pack(box, efl_added));
efl_ui_textbox_scrollable_set(_editor, EINA_TRUE);
efl_text_font_family_set(_editor, "Mono");
efl_text_font_size_set(_editor, 14);
}
EAPI_MAIN void

View File

@ -1,5 +1,5 @@
project(
'efl-example-focus', 'cs',
'efl-example-calculator', 'cs',
version : '0.0.1',
meson_version : '>= 0.38.0')
@ -7,3 +7,4 @@ efl_mono = dependency('efl-mono', version : '>=1.20.99')
efl_mono_libs = efl_mono.get_pkgconfig_variable('mono_libs')
subdir('src')

View File

@ -0,0 +1,198 @@
/* Simple calculator using an Efl.Ui.Table to place the buttons
*/
using System;
public class Calculator : Efl.Csharp.Application
{
private Efl.Ui.Textbox screen; // Text widget showing current value
private int prevValue = 0; // Value introduced before an operation (first operand)
private int currValue = 0; // Value currently being introduced (second operand)
private char operation = '='; // Last operation button pressed
private bool mustOverwrite = false; // Whether next number must be appended to current input
// or overwrite it
// Quits the application
private void GUIQuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEventArgs ea)
{
if (ea.Arg == false)
Efl.App.AppMain.Quit(0);
}
// Performs "operation" on "currValue" and "prevValue" and leaves result in "currValue"
private void Operate()
{
switch (operation)
{
case '+':
currValue += prevValue;
break;
case '-':
currValue = prevValue - currValue;
break;
case '*':
currValue *= prevValue;
break;
case '/':
currValue = prevValue / currValue;
break;
default:
break;
}
}
// Called every time a button is pressed
private void ButtonPressedCb(char button)
{
// If it is a number, append it to current input (or replace it)
if (button >= '0' && button <= '9')
{
if (mustOverwrite)
{
screen.Text = "";
mustOverwrite = false;
}
screen.Text = screen.Text + button.ToString();
}
else
{
switch (button)
{
case 'C':
// Clear current input
screen.Text = "0";
break;
case '+':
case '-':
case '*':
case '/':
case '=':
// If there was a pending operation, perform it
if (operation != '=')
{
Operate();
screen.Text = currValue.ToString();
}
// Store this operation
operation = button;
mustOverwrite = true;
prevValue = currValue;
break;
default:
break;
}
}
}
// Called every time the content of the screen changes
// We use it to sanitize input (remove heading zeros, for example)
// This makes more sense when the Text widget is editable, since the user
// is free to type anything.
private void ScreenChangedCb(object sender, EventArgs ea)
{
string text = "";
string str = screen.Text;
int d;
if (str == "" || str == "-")
{
text = "0";
}
else
{
try
{
d = Convert.ToInt32(str);
text = d.ToString();
currValue = d;
}
catch {}
}
if (text != str) screen.Text = text;
}
// Creates an Efl.Ui.Button and positions it in the given position inside the table
// The button text is colored with "r, g, b"
// "text" is what is drawn on the button, which might be a multi-byte unicode string.
// "command" is a single-char id for the button.
private void AddButton(Efl.Ui.Table table, string text, char command, int posx, int posy, int r, int g, int b)
{
var button = new Efl.Ui.Button(table);
table.PackTable(button, posx, posy, 1, 1);
button.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs ea) => {
ButtonPressedCb(command);
};
// Buttons can only have simple text (no font, styles or markup) but can swallow
// any other object we want.
// Therefore we create a more complex Efl.Ui.Text object and use it as content for the button.
var label = new Efl.Ui.Textbox(table);
label.Editable = false;
label.TextHorizontalAlign = 0.5;
label.TextVerticalAlign = 0.5;
label.Color = (r, g, b, 255);
label.Text = text;
label.FontFamily = "Sans";
label.FontSize = 36;
button.Content = label;
}
// Called on start up. We use it to create the UI.
protected override void OnInitialize(string[] args)
{
// The window
var win = new Efl.Ui.Win(Efl.App.AppMain);
win.Text = "EFL Calculator";
win.Autohide = true;
win.VisibilityChangedEvent += GUIQuitCb;
// The table is the main layout
var table = new Efl.Ui.Table(win);
win.Content = table;
table.TableSize = (4, 5);
table.HintSizeMin = new Eina.Size2D(300, 400);
// Create all buttons using the AddButton helper
AddButton(table, "1", '1', 0, 3, 255, 255, 255);
AddButton(table, "2", '2', 1, 3, 255, 255, 255);
AddButton(table, "3", '3', 2, 3, 255, 255, 255);
AddButton(table, "4", '4', 0, 2, 255, 255, 255);
AddButton(table, "5", '5', 1, 2, 255, 255, 255);
AddButton(table, "6", '6', 2, 2, 255, 255, 255);
AddButton(table, "7", '7', 0, 1, 255, 255, 255);
AddButton(table, "8", '8', 1, 1, 255, 255, 255);
AddButton(table, "9", '9', 2, 1, 255, 255, 255);
AddButton(table, "0", '0', 1, 4, 255, 255, 255);
AddButton(table, "+", '+', 3, 1, 128, 128, 128);
AddButton(table, "", '-', 3, 2, 128, 128, 128);
AddButton(table, "×", '*', 3, 3, 128, 128, 128);
AddButton(table, "÷", '/', 3, 4, 128, 128, 128);
AddButton(table, "=", '=', 2, 4, 128, 128, 128);
AddButton(table, "C", 'C', 0, 4, 0, 0, 0);
// Create a big Efl.Ui.Text screen to display the current input
screen = new Efl.Ui.Textbox(table);
screen.Text = "0";
screen.Multiline = false;
screen.Editable = false;
screen.SelectionAllowed = false;
screen.TextHorizontalAlign = 0.9;
screen.TextVerticalAlign = 0.5;
screen.TextEffectType = Efl.TextStyleEffectType.Glow;
screen.TextGlowColor = (128, 128, 128, 128);
screen.FontFamily = "Sans";
screen.FontSize = 48;
screen.ChangedEvent += ScreenChangedCb;
table.PackTable(screen, 0, 0, 4, 1);
}
}
public class Example
{
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var calculator = new Calculator();
calculator.Launch();
}
}

View File

@ -0,0 +1,12 @@
src = files([
'calculator.cs',
])
deps = [efl_mono]
executable('efl_example_calculator', src,
dependencies : deps,
cs_args : efl_mono_libs,
install : true
)

View File

@ -17,9 +17,9 @@ public class LifeBoard
private int gen = 0;
private bool[] board, boardPrev;
private bool[] board;
private bool[] board1, board2;
private efl.loop.Timer lifeTimer = null;
private Efl.LoopTimer lifeTimer = null;
private LifeRender lifeRender = null;
private void CellOn(int x, int y)
@ -56,16 +56,13 @@ public class LifeBoard
BoardSetup();
board = board1;
boardPrev = board2;
}
public void Run(efl.ui.Win win)
public void Run(Efl.Ui.Win win)
{
lifeTimer = new efl.loop.Timer(null, (efl.loop.Timer etimer) => {
etimer.SetInterval(0.1);
});
lifeTimer = new Efl.LoopTimer(win, 0.1);
lifeTimer.TICK += (object sender, EventArgs ev) => {
lifeTimer.TimerTickEvent += (object sender, EventArgs ev) => {
Nextgen();
if (this.lifeRender != null)
this.lifeRender.Refresh(win);
@ -109,7 +106,7 @@ public class LifeBoard
public void Nextgen()
{
int[] work = null;
bool[] work = null;
++gen;
if (board == board1)
@ -117,8 +114,8 @@ public class LifeBoard
else
work = board1;
for (int y = 0; y < LIFE_BOARD_HEIGHT; y++)
for (int x = 0; x < LIFE_BOARD_WIDTH; x++)
for (int y = 0; y < Height; y++)
for (int x = 0; x < Width; x++)
{
int i = IndexForPosition(x, y);
@ -139,15 +136,14 @@ public class LifeBoard
}
}
boardPrev = board;
board = work;
}
public void TogglePause(efl.ui.Win win)
public void TogglePause(Efl.Ui.Win win)
{
if (lifeTimer)
if (lifeTimer != null)
{
lifeTimer.Dispose();
lifeTimer.Del();
lifeTimer = null;
}
else

View File

@ -1,67 +1,77 @@
using System;
public class LifeWindow
public class LifeWindow : Efl.Csharp.Application
{
private LifeBoard lifeBoard;
private LifeRender lifeRender;
private Efl.Ui.Win win;
void ResizeEvt(efl.ui.Win win, EventArgs ev)
void ResizeEvent(object sender, EventArgs ev)
{
lifeRender.Layout(win);
lifeRender.RenderLayout((Efl.Ui.Win)sender);
}
void QuitEvt(efl.ui.Win win, EventArgs ev)
void QuitEvent(object sender, Efl.Gfx.EntityVisibilityChangedEventArgs ev)
{
// quit the mainloop
efl.ui.Config.Exit();
if (ev.Arg == false)
Efl.App.AppMain.Quit(0);
}
void TouchEvt(efl.ui.Win win, efl.input.Pointer ev)
void TouchEvent(object sender, Efl.Input.InterfacePointerDownEventArgs ev)
{
int cellx, celly;
var position = ev.GetPosition();
var position = ev.Arg.Position;
lifeRender.CellForCoords(win, position, out cellx, out celly);
int i = LifeRender.IndexForPosition(cellx, celly);
int i = LifeBoard.IndexForPosition(cellx, celly);
lifeBoard.Cells[i] = !lifeBoard.Cells[i];
lifeRender.RenderCell(win, cellx, celly);
}
void KeyDownEvt(efl.ui.Win win, efl.input.Key ev)
void KeyDownEvent(object sender, Efl.Input.InterfaceKeyDownEventArgs ev)
{
if (ev.GetKey() == "space")
if (ev.Arg.KeySym == "space")
lifeBoard.TogglePause(win);
}
public void Run()
protected override void OnInitialize(string[] args)
{
lifeBoard.Run(win);
}
public LifeWindow()
{
efl.ui.Win win = new efl.Ui.WinConcrete(null, (efl.ui.Win ewin) => {
ewin.SetWinType(efl.ui.win.Type.Basic);
ewin.SetText("EFL Life");
ewin.SetAutohide(true);
});
win = new Efl.Ui.Win(parent: null, winName: "Life", winType: Efl.Ui.WinType.Basic);
win.Text = "EFL Life";
win.Autohide = true;
// when the user clicks "close" on a window there is a request to hide
win.HIDE += QuitEvt;
eina.Size2D sz;
sz.W = 10 * LifeBoard.Width * win.GetScale();
sz.H = 10 * LifeBoard.Height * win.GetScale();
((Efl.Gfx.IEntity)win).VisibilityChangedEvent += QuitEvent;
lifeBoard = new LifeBoard();
lifeRender = new LifeRender(win, lifeBoard);
lifeRender.Refresh(win);
win.RESIZE += ResizeEvt;
win.POINTER_DOWN += TouchEvt;
win.KEY_DOWN += KeyDownEvt;
((Efl.Gfx.IEntity)win).SizeChangedEvent += ResizeEvent;
((Efl.Input.IInterface)win).PointerDownEvent += TouchEvent;
((Efl.Input.IInterface)win).KeyDownEvent += KeyDownEvent;
win.SetSize(sz);
win.Size = new Eina.Size2D((int)(10 * LifeBoard.Width * win.Scale),
(int)(10 * LifeBoard.Height * win.Scale));
lifeBoard.Run(win);
}
protected override void OnPause() {
if (win != null) {
lifeBoard.TogglePause(win);
}
}
protected override void OnResume() {
if (win != null) {
lifeBoard.TogglePause(win);
}
}
protected override void OnTerminate() {
Console.WriteLine("Goodbye.");
}
}
@ -69,15 +79,8 @@ public class Example
{
public static void Main()
{
efl.All.Init(efl.Components.Ui);
var lifeWin = new LifeWindow();
var lifeWin = new LifeWin();
lifeWin.Run();
// start the mainloop
efl.ui.Config.Run();
efl.All.Shutdown();
lifeWin.Launch();
}
}

View File

@ -2,34 +2,34 @@ using System;
public class LifeRender
{
private efl.canvas.Rectangle[] lifeCells;
private Efl.Canvas.Rectangle[] lifeCells;
private LifeBoard lifeBoard;
public LifeRender(efl.ui.Win win, LifeBoard board)
public LifeRender(Efl.Ui.Win win, LifeBoard board)
{
lifeBoard = board;
lifeBoard.SetRender(this);
lifeCells = new efl.canvas.Rectangle[LifeBoard.Height * LifeBoard.Width];
lifeCells = new Efl.Canvas.Rectangle[LifeBoard.Height * LifeBoard.Width];
for (int y = 0; y < LifeBoard.Height; ++y)
for (int x = 0; x < LifeBoard.Width; ++x)
lifeCells[LifeBoard.IndexForPosition(x, y)] = new efl.canvas.RectangleConcrete(win);
lifeCells[LifeBoard.IndexForPosition(x, y)] = new Efl.Canvas.Rectangle(win);
RenderLayout(win);
}
public void CellForCoords(efl.ui.Win win, eina.Position2D coord, out int x, out int y)
public void CellForCoords(Efl.Ui.Win win, Eina.Position2D coord, out int x, out int y)
{
eina.Size2D size = win.GetSize();
Eina.Size2D size = win.Size;
x = coord.X / ((double) size.W / LifeBoard.Width);
y = coord.Y / ((double) size.H / LifeBoard.Height);
x = coord.X * LifeBoard.Width / size.W;
y = coord.Y * LifeBoard.Height / size.H;
}
public void RenderLayout(efl.ui.Win win)
public void RenderLayout(Efl.Ui.Win win)
{
eina.Size2D size = win.GetSize();
Eina.Size2D size = win.Size;
double cw = (double) size.W / LifeBoard.Width;
double ch = (double) size.H / LifeBoard.Height;
@ -39,30 +39,24 @@ public class LifeRender
var rect = lifeCells[LifeBoard.IndexForPosition(x, y)];
// the little +1 here will avoid tearing as we layout non-multiple sizes
eina.Size2D sz;
sz.W = cw + 1;
sz.H = ch + 1;
rect.SetSize(sz);
rect.Size = new Eina.Size2D((int)(cw + 1), (int)(ch + 1));
eina.Position2D pos;
pos.X = x * cw;
pos.Y = y * ch;
rect.SetPosition(pos);
rect.Position = new Eina.Position2D((int)(x * cw), (int)(y * ch));
}
}
public void RenderCell(efl.ui.Win win, int x, int y)
public void RenderCell(Efl.Ui.Win win, int x, int y)
{
int i = LifeBoard.IndexForPosition(x, y);
var rect = lifeCells[i];
if (lifeBoard.Cells[i])
rect.SetColor(0, 0, 0, 255);
rect.Color = (0, 0, 0, 255);
else
rect.SetColor(255, 255, 255, 255);
rect.Color = (255, 255, 255, 255);
}
public void Refresh(efl.ui.Win win)
public void Refresh(Efl.Ui.Win win)
{
for (int y = 0; y < LifeBoard.Height; ++y)
for (int x = 0; x < LifeBoard.Width; ++x)

View File

@ -0,0 +1,10 @@
project(
'efl-example-mvvm', 'cs',
version : '0.0.1',
meson_version : '>= 0.49.0')
efl_mono = dependency('efl-mono', version : '>=1.23.99')
efl_mono_libs = efl_mono.get_pkgconfig_variable('mono_libs')
subdir('src')

View File

@ -1,11 +1,12 @@
src = files([
'focus_main.cs',
'mvvm_basic.cs',
])
deps = [efl_mono]
executable('efl_example_focus', src,
executable('efl_example_mvvm', src,
dependencies : deps,
cs_args : efl_mono_libs,
install : true
)

View File

@ -0,0 +1,69 @@
using System;
class WeatherStation
{
public String Nick { get; set; }
public float Temperature { get; set; }
public static Efl.UserModel<WeatherStation> CreateModel(Efl.Loop loop)
{
Efl.UserModel<WeatherStation> stations = new Efl.UserModel<WeatherStation>(loop);
stations.Add (new WeatherStation{ Nick="FLN", Temperature=20 });
stations.Add (new WeatherStation{ Nick="SAO", Temperature=25 });
stations.Add (new WeatherStation{ Nick="RIO", Temperature=35 });
stations.Add (new WeatherStation{ Nick="BSB", Temperature=30 });
return stations;
}
}
class WeatherServer
{
}
class Application : Efl.Csharp.Application
{
private Efl.Ui.Win win;
protected override void OnInitialize(string[] args)
{
win = new Efl.Ui.Win(parent: null, winName: "MVVM Example",
winType: Efl.Ui.WinType.Basic);
win.Text = "EFL Life";
win.Autohide = true;
win.VisibilityChangedEvent += QuitEvt;
var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>(win);
// Text property is temporarily excluded from the extension method generation
// due to conflicts with the text classes.
factory.BindProperty("text", "Nick");
var model = WeatherStation.CreateModel(Efl.App.AppMain);
var manager = new Efl.Ui.PositionManager.List(win);
var list = new Efl.Ui.CollectionView(win);
list.PositionManager = manager;
list.Model = model;
list.Factory = factory;
win.SetContent(list);
win.Size = new Eina.Size2D(640, 480);
win.Visible = true;
}
void QuitEvt(object sender, Efl.Gfx.EntityVisibilityChangedEventArgs ev)
{
if (ev.Arg == false)
{
Efl.App.AppMain.Quit(0);
}
}
public static void Main()
{
var app = new Application();
app.Launch();
}
}

View File

@ -1,142 +1,197 @@
/* Simple text editor with a main text box and a toolbar on top:
+vbox----------------------------------------+
| +hbox------------------------------------+ |
| | +btn-+ +btn-+ +btn-+ +box-----+ +btn-+ | |
| | |NEW | |SAVE| |LOAD| | spacer | |QUIT| | |
| | +----+ +----+ +----+ +--------+ +----+ | |
| +----------------------------------------+ |
| +text------------------------------------+ |
| | | |
| | | |
| | Main text box | |
| | | |
| | | |
| +----------------------------------------+ |
+--------------------------------------------+
*/
using System;
public class TextEditor : IDisposable
public class TextEditor : Efl.Csharp.Application
{
private efl.ui.IWin win;
private efl.ui.IText editor;
private efl.ui.IButton toolbarNew;
private Efl.Ui.Win win; // The main window
private Efl.Ui.Textbox editorTextBox; // The main text entry
private Efl.Ui.Button toolbarButtonNew; // The "New" button in the toolbar
private Efl.Ui.Button toolbarButtonSave; // The "Save" button in the toolbar
private Efl.Ui.Button toolbarButtonLoad; // The "Load" button in the toolbar
private bool edited = false;
private bool edited = false; // Document was edited since last save
// File to load and save is fixed since we do not use a file selection dialog
private readonly string filename = System.IO.Path.Combine(System.IO.Path.GetTempPath(),
"texteditor_example.txt");
private void GUIQuitCb(object sender, EventArgs ea)
// Quits the application
private void GUIQuitCb(object sender, Efl.Gfx.EntityVisibilityChangedEventArgs ea)
{
efl.ui.Config.Exit();
if (ea.Arg == false)
Efl.App.AppMain.Quit(0);
}
// Enables or disables buttons on the toolbar as required
private void GUIToolbarRefresh()
{
// "New" is enabled if there is text in the text box
toolbarButtonNew.Disabled = string.IsNullOrEmpty(editorTextBox.Text);
// "Save" is enabled if the text has been modified since last save or load
toolbarButtonSave.Disabled = !edited;
// "Load" is enabled if there is a file to load
toolbarButtonLoad.Disabled = !System.IO.File.Exists(filename);
}
// Called when the text in the editor has changed
private void EditorChangedCb(object sender, EventArgs ea)
{
edited = true;
GUIToolbarRefresh();
}
private efl.ui.IButton GUIToolbarButtonAdd(efl.ui.IBox toolbar, string name, string iconName, EventHandler func)
// Shows a modal message popup with an "OK" button
private void ShowMessage(string message)
{
efl.ui.IButton button = new efl.ui.Button(toolbar);
button.SetText(name);
button.ClickedEvt += func;
var popup = new Efl.Ui.AlertPopup (win);
popup.ScrollableText = message;
popup.HintSizeMax = new Eina.Size2D(200, 200);
popup.SetButton(Efl.Ui.AlertPopupButton.Positive, "OK", null);
popup.ButtonClickedEvent +=
(object sender, Efl.Ui.AlertPopupButtonClickedEventArgs ea) => {
// Dismiss popup when the button is clicked
((Efl.Ui.AlertPopup)sender).Del();
};
}
toolbar.DoPack(button);
// Adds a button to the toolbar, with the given text, icon and click event handler
private Efl.Ui.Button GUIToolbarButtonAdd(Efl.Ui.Box toolbar, string name,
string iconName, EventHandler<Efl.Input.ClickableClickedEventArgs> func)
{
var button = new Efl.Ui.Button(toolbar);
button.Text = name;
button.ClickedEvent += func;
button.HintWeight = (0, 1);
efl.ui.IImage img = new efl.ui.Image(toolbar);
img.SetIcon(iconName);
efl.Content.static_cast(button.GetPart("efl.content")).SetContent(img);
// Set the content of the button, which is an image
var image = new Efl.Ui.Image(toolbar);
image.SetIcon(iconName);
button.SetContent(image);
toolbar.Pack(button);
return button;
}
private void GUIToolbarSetup(efl.ui.IBox parent)
// Creates a new toolbar, with all its buttons
private void GUIToolbarSetup(Efl.Ui.Box parent)
{
efl.ui.IBox bar = new efl.ui.Box(parent);
bar.SetHintWeight(1, 0);
bar.SetDirection(efl.ui.Dir.Horizontal);
parent.DoPack(bar);
// Create a horizontal box container for the buttons
var bar = new Efl.Ui.Box(parent);
// 0 vertical weight means that the toolbar will have the minimum height
// to accommodate all its buttons and not a pixel more. The rest of the
// space will be given to the other object in the parent container.
bar.HintWeight = (1, 0);
bar.Orientation = Efl.Ui.LayoutOrientation.Horizontal;
parent.Pack(bar);
toolbarNew = GUIToolbarButtonAdd(bar, "New", "document-new",
(object sender, EventArgs ea) =>
{
editor.SetText("");
edited = false;
// "New" button
toolbarButtonNew = GUIToolbarButtonAdd(bar, "New", "document-new",
(object sender, Efl.Input.ClickableClickedEventArgs ea) => {
// When this button is clicked, remove content and refresh toolbar
editorTextBox.Text = "";
GUIToolbarRefresh();
});
});
// spacer box
efl.ui.IBox box = new efl.ui.Box(parent);
box.SetHintWeight(10, 0);
bar.DoPack(box);
// "Save" button
toolbarButtonSave = GUIToolbarButtonAdd(bar, "Save", "document-save",
(object sender, Efl.Input.ClickableClickedEventArgs ea) => {
// When this button is clicked, try to save content and refresh toolbar
try {
System.IO.File.WriteAllText(filename, editorTextBox.Text);
edited = false;
GUIToolbarRefresh();
ShowMessage("Saved!");
} catch (Exception e) {
// If something fails, show the error message
ShowMessage(e.Message);
}
});
GUIToolbarButtonAdd(bar, "Quit", "application-exit", GUIQuitCb);
// "Load" button
toolbarButtonLoad = GUIToolbarButtonAdd(bar, "Load", "document-open",
(object sender, Efl.Input.ClickableClickedEventArgs ea) => {
// When this button is clicked, try to load content and refresh toolbar
try {
editorTextBox.Text = System.IO.File.ReadAllText(filename);
edited = false;
GUIToolbarRefresh();
ShowMessage("Loaded!");
} catch (Exception e) {
// If something fails, show the error message
ShowMessage(e.Message);
}
});
GUIToolbarRefresh();
// Spacer box to use all available space not required by buttons
// (It has a default horizontal weight of 1, whereas all buttons have
// a horizontal weight of 0).
// As a result, it pushes the "Quit" button to the right margin and
// the rest to the left.
Efl.Ui.Box box = new Efl.Ui.Box(parent);
bar.Pack(box);
// "Quit" button
GUIToolbarButtonAdd(bar, "Quit", "application-exit", (object sender, Efl.Input.ClickableClickedEventArgs e) => { Efl.Ui.Config.Exit(); } );
}
private void GUIToolbarRefresh()
// Builds the user interface for the text editor
protected override void OnInitialize(string[] args)
{
toolbarNew.SetDisabled(!edited);
}
public TextEditor()
{
win = new efl.ui.Win(null, (efl.ui.IWin ewin) => {
ewin.SetWinType(efl.ui.Win_Type.Basic);
ewin.SetText("Text Editor");
ewin.SetAutohide(true);
});
// when the user clicks "close" on a window there is a request to hide
win.HideEvt += GUIQuitCb;
efl.ui.IBox box = new efl.ui.Box(win);
eina.Size2D sz;
sz.W = 360;
sz.H = 240;
box.SetHintMin(sz);
// Create a window and initialize it
win = new Efl.Ui.Win(parent: Efl.App.AppMain);
win.Text = "Text Editor";
win.Autohide = true;
win.VisibilityChangedEvent += GUIQuitCb;
// Create a vertical box container
Efl.Ui.Box box = new Efl.Ui.Box(win);
win.SetContent(box);
// Create the toolbar and add it to the box
GUIToolbarSetup(box);
editor = new efl.ui.Text(box);
editor.SetFont("Mono", 14);
editor.SetMultiline(true);
editor.SetEditable(true);
editor.SetScrollable(true);
editor.SetScrollable(true);
editor.ChangedEvt += EditorChangedCb;
editor.ChangedUserEvt += EditorChangedCb;
// Create the main text entry
editorTextBox = new Efl.Ui.Textbox(box);
editorTextBox.FontFamily = "Mono";
editorTextBox.FontSize = 14;
editorTextBox.Multiline = true;
editorTextBox.Editable = true;
editorTextBox.Scrollable = true;
editorTextBox.HintSizeMin = new Eina.Size2D(360, 240);
editorTextBox.ChangedEvent += EditorChangedCb;
editorTextBox.ChangedUserEvent += EditorChangedCb;
box.Pack(editorTextBox);
box.DoPack(editor);
}
~TextEditor()
{
Dispose(false);
}
protected void Dispose(bool disposing)
{
editor.Dispose();
toolbarNew.Dispose();
win.Dispose();
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
public void Run()
{
// start main loop
efl.ui.Config.Run();
// Initial refresh of the toolbar buttons
GUIToolbarRefresh();
}
}
public class Example
{
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
efl.All.Init(efl.Components.Ui);
var textEditor = new TextEditor();
textEditor.Run();
// dispose after quit
textEditor.Dispose();
efl.All.Shutdown();
TextEditor editor = new TextEditor();
editor.Launch();
}
}

10
meson.build.in Normal file
View File

@ -0,0 +1,10 @@
project('efl-examples',
'c',
version: '1.0'
)
subprojects = $subprojects
foreach subp : subprojects
subproject(subp)
endforeach

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -69,7 +68,7 @@ _events_freeze(Efl_Loop *mainloop)
efl_add(EFL_LOOP_TIMER_CLASS, mainloop,
efl_name_set(efl_added, "timer2"),
efl_loop_timer_interval_set(efl_added, .1),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _freezethaw_cb, mainloop));
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _freezethaw_cb, mainloop));
}
static void
@ -90,7 +89,7 @@ _timer_cb(void *data EINA_UNUSED, const Efl_Event *event)
}
EFL_CALLBACKS_ARRAY_DEFINE(_callback_array,
{ EFL_LOOP_TIMER_EVENT_TICK, _timer_cb },
{ EFL_LOOP_TIMER_EVENT_TIMER_TICK, _timer_cb },
{ EFL_EVENT_DEL, _del_obj_cb })
static void

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -60,7 +59,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, 0.0005),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _timer_cb, NULL));
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _timer_cb, NULL));
}
EFL_MAIN()

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -22,7 +21,7 @@ _io_write(const char *filename)
Efl_Io_File *file;
file = efl_new(EFL_IO_FILE_CLASS,
efl_file_set(efl_added, filename, NULL), // mandatory
efl_file_set(efl_added, filename), // mandatory
efl_io_file_flags_set(efl_added, O_WRONLY | O_CREAT), // write and create - default is read
efl_io_file_mode_set(efl_added, 0644), // neccessary if we use O_CREAT
efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended
@ -51,7 +50,7 @@ _io_read(const char *filename)
Efl_Io_File *file;
file = efl_new(EFL_IO_FILE_CLASS,
efl_file_set(efl_added, filename, NULL), // mandatory
efl_file_set(efl_added, filename), // mandatory
efl_io_closer_close_on_invalidate_set(efl_added, EINA_TRUE)); // recommended
if (!file)

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -64,7 +63,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, 30),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK, _timer_cb, NULL));
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK, _timer_cb, NULL));
}
EFL_MAIN()

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -103,7 +102,7 @@ _test1_simple_future(Efl_Loop *loop)
// simulate a delayed promise resolve.
efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, 1),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK,
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK,
_test1_resolve, promise));
}
@ -154,7 +153,7 @@ _test2_failed_future(Efl_Loop *loop)
// simulate a delayed promise rejection.
efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, 1),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK,
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK,
_test2_reject, promise));
}
@ -278,7 +277,7 @@ _test4_chained_future(Efl_Loop *loop)
// simulate a delayed promise resolve.
efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, 1),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK,
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK,
_test4_resolve, promise));
}

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -197,7 +196,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
/* The TCP client to use to send/receive network data */
_dialer = efl_add(EFL_NET_DIALER_TCP_CLASS, loop,
efl_name_set(efl_added, "dialer"),
efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_CONNECTED, _dialer_connected, NULL));
efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _dialer_connected, NULL));
if (!_dialer)
{
fprintf(stderr, "ERROR: could not create Efl_Net_Dialer_Tcp\n");

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -138,7 +137,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
/* The TCP client to use to send/receive network data */
_dialer = efl_add(EFL_NET_DIALER_TCP_CLASS, loop,
efl_name_set(efl_added, "dialer"),
efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_CONNECTED, _dialer_connected, NULL));
efl_event_callback_add(efl_added, EFL_NET_DIALER_EVENT_DIALER_CONNECTED, _dialer_connected, NULL));
if (!_dialer)
{
fprintf(stderr, "ERROR: could not create Efl_Net_Dialer_Tcp\n");

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -134,7 +133,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
// Wait for 10 seconds before exiting this example
efl_add(EFL_LOOP_TIMER_CLASS, loop,
efl_loop_timer_interval_set(efl_added, 10.0),
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TICK,
efl_event_callback_add(efl_added, EFL_LOOP_TIMER_EVENT_TIMER_TICK,
_quit_cb, NULL));
}
EFL_MAIN()

View File

@ -1,7 +1,5 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>
@ -31,7 +29,7 @@ _gui_setup()
Eo *win, *box, *hbox, *about;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Hello World"),
efl_event_callback_add(efl_added,
EFL_UI_WIN_EVENT_DELETE_REQUEST,
@ -40,9 +38,9 @@ _gui_setup()
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_content_set(win, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
efl_add(EFL_UI_TEXT_CLASS, box,
efl_add(EFL_UI_TEXTBOX_CLASS, box,
efl_text_set(efl_added, "Label"),
efl_text_interactive_editable_set(efl_added, EINA_FALSE),
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
@ -50,8 +48,8 @@ _gui_setup()
efl_pack(box, efl_added));
hbox = efl_add(EFL_UI_BOX_CLASS, box,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.1),
efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
efl_gfx_hint_weight_set(efl_added, 1.0, 0.1),
efl_pack(box, efl_added));
about = efl_add(EFL_UI_BUTTON_CLASS, hbox,
@ -59,7 +57,7 @@ _gui_setup()
efl_pack(hbox, efl_added),
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
_focus_changed, NULL),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_about_clicked_cb, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, hbox,
@ -67,10 +65,10 @@ _gui_setup()
efl_pack(hbox, efl_added),
efl_event_callback_add(efl_added, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED,
_focus_changed, NULL),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_quit_clicked_cb, efl_added));
efl_ui_focus_util_focus(EFL_UI_FOCUS_UTIL_CLASS, about);
efl_ui_focus_util_focus(about);
}
EAPI_MAIN void

View File

@ -21,3 +21,10 @@ executable('efl_reference_ui_translation',
install : true
)
executable('efl_reference_ui_focus',
files(['focus_main.c']),
dependencies : deps,
include_directories : inc,
install : true
)

View File

@ -1,12 +1,10 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Elementary.h>
#include <Efl_Ui.h>
/*
* Efl.UI container exmaples.
* Efl.UI container examples.
*
* Load and pack a selection of containers.
* Each has it's own unique layout and methods which are demonstrated below.
@ -17,7 +15,6 @@
* TODO - still ELM Conformant
* TODO - still ELM Mapbuf
* TODO - still ELM Scroller
* TODO - still ELM Table
*/
// quit the app, called if the user clicks the Quit button or the window is deleted
@ -37,7 +34,7 @@ _ui_table_setup(Efl_Ui_Win *win)
table = efl_add(EFL_UI_TABLE_CLASS, win);
efl_pack_table_columns_set(table, 2);
efl_pack_table_direction_set(table, EFL_UI_DIR_RIGHT, EFL_UI_DIR_DOWN);
efl_ui_layout_orientation_set(table, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Long Button"),
@ -62,7 +59,7 @@ _ui_boxes_setup(Efl_Ui_Win *win)
int i;
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_pack_padding_set(efl_added, 5, 0, EINA_TRUE));
efl_gfx_arrangement_content_padding_set(efl_added, 5, 0));
for (i = 1; i <= 4; i++)
{
@ -71,7 +68,7 @@ _ui_boxes_setup(Efl_Ui_Win *win)
efl_pack(box, efl_added));
if (i == 2)
efl_gfx_size_hint_max_set(button, EINA_SIZE2D(100, 50));
efl_gfx_hint_size_max_set(button, EINA_SIZE2D(100, 50));
}
return box;
@ -90,15 +87,15 @@ _ui_panes_setup(Efl_Ui_Win *win)
horiz_split = efl_add(EFL_UI_PANES_CLASS, win,
efl_content_set(efl_part(split, "second"), efl_added),
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
efl_ui_panes_split_ratio_set(efl_added, 0.85));
efl_content_set(efl_part(horiz_split, "first"), _ui_table_setup(win));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Quit"),
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(150, 30)),
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(150, 30)),
efl_content_set(efl_part(horiz_split, "second"), efl_added),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_quit_cb, efl_added));
}
@ -108,7 +105,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
Eo *win;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Hello World"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -28,7 +27,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
Efl_Ui_Win *win, *box;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Size Control"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
@ -45,12 +44,12 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Small"),
efl_pack_end(box, efl_added),
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(50, 50)));
efl_gfx_hint_size_max_set(efl_added, EINA_SIZE2D(50, 50)));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Big Button"),
efl_pack_end(box, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100)));
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)));
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));
}

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <stdio.h>
@ -34,7 +33,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
Efl_Ui_Win *win, *box;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
efl_text_set(efl_added, "Translations"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
@ -45,18 +44,18 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl_content_set(win, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_ui_translatable_text_set(efl_added, "Translations", _TEXT_DOMAIN),
efl_ui_l10n_text_set(efl_added, "Translations", _TEXT_DOMAIN),
efl_pack_end(box, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_ui_translatable_text_set(efl_added, "Help", _TEXT_DOMAIN),
efl_ui_l10n_text_set(efl_added, "Help", _TEXT_DOMAIN),
efl_pack_end(box, efl_added));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_ui_translatable_text_set(efl_added, "Quit", _TEXT_DOMAIN),
efl_ui_l10n_text_set(efl_added, "Quit", _TEXT_DOMAIN),
efl_pack_end(box, efl_added),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(100, 100)),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 100)),
efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED,
_gui_quit_cb, efl_added));
efl_gfx_entity_size_set(win, EINA_SIZE2D(320, 320));

View File

@ -1,5 +1,5 @@
project(
'efl-reference-net', 'c',
'efl-reference-core', 'cs',
version : '0.0.1',
meson_version : '>= 0.38.0')

View File

@ -0,0 +1,70 @@
/*
* Efl Core Event examples.
*
* This example shows the various ways of adding callbacks for standard events.
* It also demonstrates how to freeze and thaw events on an object.
*/
using System;
public class Example : Efl.Csharp.Application
{
// Polling callback
private static void PollCb(object sender, EventArgs e)
{
Console.WriteLine(" Poll from {0}", ((Efl.Object)sender).Name);
}
protected override void OnInitialize(string[] args)
{
// Retrieve the application's main loop
var mainloop = Efl.App.AppMain;
mainloop.Name = "Mainloop";
// This event gets triggered continuously
mainloop.PollHighEvent += PollCb;
// This timer will control events fired by the main loop
var timer = new Efl.LoopTimer(mainloop, 0.1);
timer.Name = "Timer";
// To count number of timer triggers
int tick_count = 0;
timer.TimerTickEvent += (object sender, EventArgs e) => {
string message = "Tick {0} from {1}: ";
// Depending on the number of timer ticks, it does a different thing
switch (tick_count) {
case 0:
message += "Freezing Mainloop events";
mainloop.FreezeEvent();
break;
case 1:
message += "Thawing Mainloop events";
mainloop.ThawEvent();
break;
default:
message += "Quitting";
mainloop.Quit(new Eina.Value(0));
break;
}
Console.WriteLine(message, tick_count, ((Efl.Object)sender).Name);
tick_count++;
};
Console.WriteLine("Waiting for Timer to call back...");
}
protected override void OnTerminate()
{
Console.WriteLine("Application is over");
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -0,0 +1,46 @@
/*
* Efl Core Idler examples.
*
* Here we register callbacks to execute code when the loop is idle.
* We also record when we enter or exit the idle state.
*
* We initiate a timer to exit the idle state and then exit the application.
*/
using System;
public class Example : Efl.Csharp.Application
{
protected override void OnInitialize(string[] args)
{
// Retrieve the application's main loop
var mainloop = Efl.App.AppMain;
// Register to all Idle events
mainloop.IdleEnterEvent += (object sender, EventArgs e) => {
Console.WriteLine("IDLE ENTER: Entering idle state.");
};
mainloop.IdleEvent += (object sender, EventArgs e) => {
Console.WriteLine("IDLE: Executing idler callback while in idle state.");
};
mainloop.IdleExitEvent += (object sender, EventArgs e) => {
Console.WriteLine("IDLE EXIT: Leaving idle state.");
};
// Use a timer to exit the application
var timer = new Efl.LoopTimer(mainloop, 0.02);
timer.TimerTickEvent += (object sender, EventArgs e) => {
Console.WriteLine("TIMER: timer callback called, exiting.");
mainloop.Quit(0);
};
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -0,0 +1,45 @@
/*
* Efl Core Poll examples.
*
* This example sets up poll callbacks for LOW, MEDIUM and HIGH frequency events.
* We run for 30 seconds and print to stdout to show when each is called.
* Depending on your system this may not include any LOW frequency polls.
*/
using System;
public class Example : Efl.Csharp.Application
{
protected override void OnInitialize(string[] args)
{
// Retrieve the application's main loop
var mainloop = Efl.App.AppMain;
// Register to all Poll events
mainloop.PollLowEvent += (object sender, EventArgs e) => {
Console.Write("L");
};
mainloop.PollMediumEvent += (object sender, EventArgs e) => {
Console.Write("M");
};
mainloop.PollHighEvent += (object sender, EventArgs e) => {
Console.Write(".");
};
// Use a timer to exit the application
var timer = new Efl.LoopTimer(mainloop, 30);
timer.TimerTickEvent += (object sender, EventArgs e) => {
Console.WriteLine("\nTIMER: timer callback called, exiting.");
mainloop.Quit(0);
};
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,21 +1,21 @@
deps = [efl_mono]
executable('efl_reference_net_io',
files(['net_io.cs']),
executable('efl_reference_core_event',
files(['core_event.cs']),
dependencies : deps,
cs_args : efl_mono_libs,
install : true
)
executable('efl_reference_net_io_buffered',
files(['net_io_buffered.cs']),
executable('efl_reference_core_idler',
files(['core_idler.cs']),
dependencies : deps,
cs_args : efl_mono_libs,
install : true
)
executable('efl_reference_net_session',
files(['net_session.cs']),
executable('efl_reference_core_poll',
files(['core_poll.cs']),
dependencies : deps,
cs_args : efl_mono_libs,
install : true

View File

@ -1,18 +1,18 @@
/*
* Eina Array examples.
* Eina.Array examples.
*
* These examples demonstrate how to work with eina_array data and methods.
* We use a simple array of strings to initialise our eina_array before
* These examples demonstrate how to work with Eina.Array data and methods.
* We use a simple array of strings to initialise our Eina.Array before
* performing various mutations and printing the results.
*/
using System;
public class Example
public class Example : Efl.Csharp.Application
{
static eina.Array<string> CreateArray()
static Eina.Array<string> CreateArray()
{
// some content to populate our array
// Some content to populate our array
string[] names =
{
"helo", "hera", "starbuck", "kat", "boomer",
@ -21,8 +21,8 @@ public class Example
"skulls", "bulldog", "flat top", "hammerhead", "gonzo"
};
// set up an array with a growth step to give a little headroom
var array = new eina.Array<string>(25u);
// Set up an array with a growth step to give a little headroom
var array = new Eina.Array<string>(25u);
foreach (string name in names)
array.Push(name);
@ -32,44 +32,51 @@ public class Example
static bool ItemRemoveCb(string name)
{
// let's keep any strings that are no more than 7 characters long
// Let's keep any strings that are no more than 7 characters long
if (name.Length <= 7)
return false;
return true;
}
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init();
var array = CreateArray();
// show the contents of our array
Console.WriteLine("Array count: {0}", array.Count());
// Show the contents of our array
Console.WriteLine("Array count: {0}", array.Count);
Console.WriteLine("Array contents:");
foreach(string name in array)
{
// content is strings so we simply print the data
// Content is strings so we simply print the data
Console.WriteLine(" {0}", name);
}
// access a specific item in the array
// Access a specific item in the array
Console.WriteLine("Top gun: {0}", array[2]);
// update a single item in the array
// Update a single item in the array
array[17] = "flattop";
// update the array removing items that match the ItemRemoveCb criteria
// Update the array removing items that match the ItemRemoveCb criteria
// array.RemoveAll(ItemRemoveCb); // TODO: FIXME
// print the new contents of our array
Console.WriteLine("New array count: {0}", array.Length);
// Print the new contents of our array
Console.WriteLine("New array count: {0}", array.Count);
Console.WriteLine("New array contents:");
foreach(string name in array)
Console.WriteLine(" {0}", name);
array.Dispose();
efl.All.Shutdown();
Efl.App.AppMain.Quit(0);
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,7 +1,7 @@
/*
* Eina Hash examples.
* Eina.Hash examples.
*
* These examples demonstrate how to work with eina_hash data and methods.
* These examples demonstrate how to work with Eina.Hash data and methods.
*
* We have two main hash objects here, firstly an int keyed hash with some
* dummy content.
@ -12,12 +12,12 @@
using System;
using System.Collections.Generic;
public class Example
public class Example : Efl.Csharp.Application
{
static eina.Hash<Int32, string> CreateHash()
static Eina.Hash<Int32, string> CreateHash()
{
// let's create a simple hash with integers as keys
var hash = new eina.Hash<Int32, string>();
// Let's create a simple hash with integers as keys
var hash = new Eina.Hash<Int32, string>();
// Add initial entries to our hash
for (int i = 0; i < 10; ++i)
@ -30,13 +30,13 @@ public class Example
{
var hash = CreateHash();
// get an iterator of the keys so we can print a line per entry
// Get an iterator of the keys so we can print a line per entry
var iter = hash.Keys();
Console.WriteLine("Print contents of int hash");
foreach (int key in iter)
{
// look up the value for the key so we can print both
// Look up the value for the key so we can print both
string value = hash.Find(key);
Console.WriteLine($" Item found with id {key} has value {value}");
}
@ -46,26 +46,26 @@ public class Example
hash.Dispose();
}
// here we begin the phone book example
// Here we begin the phone book example
static void PrintPhonebookEntry(string key, string data)
{
Console.WriteLine($" Name: {key}\tNumber {data}\n");
}
static void PrintPhonebook(eina.Hash<string, string> book)
static void PrintPhonebook(Eina.Hash<string, string> book)
{
int count = book.Population();
Console.WriteLine($"Complete phone book ({count}):");
// as an enumerator, iterate over the key and value for each entry
// As an enumerator, iterate over the key and value for each entry
foreach (KeyValuePair<string, string> kvp in book)
PrintPhonebookEntry(kvp.Key, kvp.Value);
Console.WriteLine("");
}
static eina.Hash<string, string> CreatePhonebook()
static Eina.Hash<string, string> CreatePhonebook()
{
string[] names =
{
@ -78,8 +78,8 @@ public class Example
"+23 45 678-91012", "+34 56 789-10123"
};
// create hash of strings to strings
var hash = new eina.Hash<string, string>();
// Create hash of strings to strings
var hash = new Eina.Hash<string, string>();
// Add initial entries to our hash
for (int i = 0; i < 4; ++i)
@ -117,13 +117,20 @@ public class Example
phone_book.Dispose();
}
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init();
HashDemo();
PhonebookDemo();
efl.All.Shutdown();
Efl.App.AppMain.Quit(0);
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,18 +1,18 @@
/*
* Eina Iterator examples.
* Eina.Iterator examples.
*
* These examples demonstrate how to work with eina_iterator methods.
* Both an eina_list and an eina_array are created and an iterator obtained
* These examples demonstrate how to work with Eina.Iterator methods.
* Both an Eina.List and an Eina.Array are created and an iterator obtained
* for both. You can see how we can use iterators irrespective of the source
* and also that there are different ways to work with iterating content.
*/
using System;
public class Example
public class Example : Efl.Csharp.Application
{
static void PrintIterator(eina.Iterator<string> it)
static void PrintIterator(Eina.Iterator<string> it)
{
Console.WriteLine("--iterator start--");
foreach(string s in it)
@ -20,7 +20,7 @@ public class Example
Console.WriteLine("-- iterator end --");
}
static eina.Array<string> CreateArray()
static Eina.Array<string> CreateArray()
{
string[] strings =
{
@ -30,7 +30,7 @@ public class Example
"boomer"
};
var array = new eina.Array<string>(4u);
var array = new Eina.Array<string>(4u);
foreach (string s in strings)
array.Push(s);
@ -38,7 +38,7 @@ public class Example
return array;
}
static eina.List<string> CreateList()
static Eina.List<string> CreateList()
{
string[] more_strings = {
"sentence strings",
@ -47,7 +47,7 @@ public class Example
"then grab your gun and bring the cat in"
};
var list = new eina.List<string>();
var list = new Eina.List<string>();
foreach (string s in more_strings)
list.Append(s);
@ -55,24 +55,31 @@ public class Example
return list;
}
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init();
// create an eina.Array and iterate through it's contents
// Create an Eina.Array and iterate through its contents
var array = CreateArray();
var it = array.GetIterator();
PrintIterator(it);
it.Dispose();
array.Dispose();
// perform the same iteration with an eina.List
// Perform the same iteration with an Eina.List
var list = CreateList();
it = list.GetIterator();
PrintIterator(it);
it.Dispose();
list.Dispose();
efl.All.Shutdown();
Efl.App.AppMain.Quit(0);
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,8 +1,8 @@
/*
* Eina List examples.
* Eina.List examples.
*
* These examples demonstrate how to work with eina_list data and methods.
* These examples demonstrate how to work with Eina.List data and methods.
* We create a simple list of names by appending strings to an empty list
* and then run various mutations and print each result.
*/
@ -10,11 +10,11 @@
using System;
using System.Linq;
public class Example
public class Example : Efl.Csharp.Application
{
static eina.List<string> CreateList()
static Eina.List<string> CreateList()
{
var list = new eina.List<string>();
var list = new Eina.List<string>();
list.Append("Adama");
list.Append("Baltar");
@ -23,19 +23,17 @@ public class Example
return list;
}
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init();
var list = CreateList();
// print our list with a simple foreach
// Print our list with a simple foreach
Console.WriteLine("List size: {0}", list.Count());
Console.WriteLine("List content:");
foreach(string item in list)
Console.WriteLine(" {0}", item);
// insert some more elements
// Insert some more elements
list.Prepend("Cain");
// list.PrependRelative("Tigh", "Baltar"); // TODO: missing
@ -43,7 +41,7 @@ public class Example
foreach(string item in list)
Console.WriteLine(" {0}", item);
// promote an item to the top of the list
// Promote an item to the top of the list
// TODO: implement ?
// list.PromoteList(list.NthList(1));
// list.Remove("Cain");
@ -52,20 +50,26 @@ public class Example
// foreach(string item in list)
// Console.WriteLine(" {0}", item);
// we can sort the list with any callback
// We can sort the list with any callback
// list.Sort((string strA, string strB) => { return strA.Compare(strB); }); // TODO: FIXME custom sort
list.Sort();
Console.WriteLine("List content sorted:");
foreach(string item in list)
Console.WriteLine(" {0}", item);
// and foreach can be in reverse too
// And foreach can be in reverse too
Console.WriteLine("List content reverse sorted:");
foreach(string item in list.Reverse())
Console.WriteLine(" {0}", item);
list.Dispose();
efl.All.Shutdown();
Efl.App.AppMain.Quit(0);
}
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,6 +1,6 @@
/*
* Efl Core Log examples.
* Eina.Log examples.
*
* This demo shows how to log at various levels and to change what log is shown.
* You can also use a custom log printer in your app as shown in _log_custom.
@ -8,19 +8,19 @@
using System;
public class Example
public class Example : Efl.Csharp.Application
{
static double Divide(int num, int denom)
{
if (denom == 0)
eina.Log.Critical("Attempt to divide by 0\n");
Eina.Log.Critical("Attempt to divide by 0\n");
else
{
if (denom < 0)
eina.Log.Warning("Possible undesirable effect, divide by negative number");
Eina.Log.Warning("Possible undesirable effect, divide by negative number");
double ret = ((double) num / denom);
eina.Log.Info($"{num} / {denom} = {ret}\n");
Eina.Log.Info($"{num} / {denom} = {ret}\n");
return ret;
}
@ -39,24 +39,31 @@ public class Example
Console.WriteLine("Executing with default logging");
Divides();
eina.Log.GlobalLevelSet(eina.Log.Level.Warning);
Console.WriteLine("Executing with Warning level"); // same as EINA_LOG_LEVEL = 2
Eina.Log.GlobalLevelSet(Eina.Log.Level.Warning);
Console.WriteLine("Executing with Warning level"); // Same as EINA_LOG_LEVEL = 2
Divides();
eina.Log.GlobalLevelSet(eina.Log.Level.Info);
Console.WriteLine("Executing with Info on"); // same as EINA_LOG_LEVEL = 3
Eina.Log.GlobalLevelSet(Eina.Log.Level.Info);
Console.WriteLine("Executing with Info on"); // Same as EINA_LOG_LEVEL = 3
Divides();
}
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init();
LogLevels();
// TODO: missing
//LogCustom();
efl.All.Shutdown();
Efl.App.AppMain.Quit(0);
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,81 +1,54 @@
/*
* Eina Value examples.
* Eina.Value examples.
*
* These examples demonstrate how to work with eina_value data and methods.
* Eina_Value is a way to represent and pass data of varying types and to
* convert efficiently between them..
* Eina_Value can even define structs for managing more complex requirements.
* These examples demonstrate how to work with Eina.Value data and methods.
* Eina.Value is a way to represent and pass data of varying types and to
* convert efficiently between them.
* Eina.Value can even define structs for managing more complex requirements.
*/
using System;
public class Example
public class Example : Efl.Csharp.Application
{
static void ValueInt()
{
int i;
// Setting up an integer value type
var int_val = new eina.Value(eina.ValueType.Int32);
int_val.Set(123);
int_val.Get(out i);
Console.WriteLine("int_val value is {0}", i);
Eina.Value int_val = 123;
Console.WriteLine("int_val value is {0}", int_val);
// It can easily be converted it to a string
// It can easily be converted to a string
string str = int_val.ToString();
Console.WriteLine("int_val to string is \"{0}\"", str);
int_val.Flush();
}
static void ValueString()
{
string str;
// Setting up an string value type
var str_val = new eina.Value(eina.ValueType.String);
str_val.Set("My string");
str_val.Get(out str);
Console.WriteLine("str_val value is \"{0}\"", str);
Eina.Value str_val = "My string";
Console.WriteLine("str_val value is \"{0}\"", str_val);
// To string should have the same content
string newstr = str_val.ToString();
Console.WriteLine("str_val to string is \"{0}\"", newstr);
str_val.Flush();
}
static void ValueConvert()
{
// set up string and int types to convert between
var str_val = new eina.Value(eina.ValueType.String);
var int_val = new eina.Value(eina.ValueType.Int32);
// convert from int to string:
int i1;
string str1;
int_val.Set(123);
int_val.Get(out i1);
// Convert from int to string:
Eina.Value int_val = 123;
Eina.Value str_val = new Eina.Value(Eina.ValueType.String);
int_val.ConvertTo(str_val);
str_val.Get(out str1);
Console.WriteLine("int_val was {0}, converted to string is \"{1}\"", i1, str1);
Console.WriteLine("int_val was {0}, converted to string is \"{1}\"", int_val, str_val);
// and the other way around!
int i2;
string str2;
str_val.Set("33");
str_val.Get(out str2);
// And the other way around!
str_val = "33.000";
str_val.ConvertTo(int_val);
int_val.Get(out i2);
Console.WriteLine("str_val was \"{0}\", converted to int is {1}", str2, i2);
str_val.Flush();
int_val.Flush();
Console.WriteLine("str_val was \"{0}\", converted to int is {1}", str_val, int_val);
}
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init();
ValueInt();
Console.WriteLine("");
@ -85,9 +58,15 @@ public class Example
ValueConvert();
Console.WriteLine("");
// TODO: FIXME
// ValueStruct();
Efl.App.AppMain.Quit(0);
}
efl.All.Shutdown();
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch(Efl.Csharp.Components.Basic);
}
}

View File

@ -1,269 +0,0 @@
/*
* Efl.Net input/output examples.
*
* This example builds on the core_io example by connecting to a remote server
* using a dialer and a command queue. The response is printed to stdout.
*/
using System;
public class ExampleRunner
{
private eina.List<efl.io.Copier> waiting = null;
private eina.List<string> commands = null;
private eina.Slice delimiter;
private efl.net.dialer.Tcp dialer = null;
private efl.io.Copier sender = null;
private efl.io.Copier receiver = null;
public void Run()
{
efl.ui.Config.Run();
}
// call this method to cleanly shut down our example
public void Quit()
{
if (waiting != null)
{
Console.Error.WriteLine("ERROR: {0} operations were waiting!", waiting.Length);
waiting.Dispose();
waiting = null;
}
if (receiver != null)
{
receiver.Close();
receiver.GetDestination().Dispose();
receiver.Dispose();
receiver = null;
}
if (sender)
{
sender.Close();
sender.GetSource().Dispose();
source.Dispose();
}
if (dialer)
dialer.Dispose();
// efl_exit(retval); // TODO missing
efl.ui.Config.Exit();
}
// iterate through the commands to send through the dialler
public void CommandNext()
{
efl.io.Reader send_queue = sender.GetSource();
if (commands != null)
{
send_queue.EosMark();
return;
}
string cmd = commands[0];
// commands.RemoveAt(0); // TODO missing
eina.Slice slice;
// slice = (Eina_Slice)EINA_SLICE_STR(cmd); // TODO missing
send_queue.Write(slice, null);
// Console.WriteLine("INFO: sent '{0}'", EINA_SLICE_STR_PRINT(slice)); // TODO missing
// don't use delimiter directly, 'Len' may be changed!
slice = delimiter;
send_queue.Write(slice, null);
}
void ReceiverData(efl.io.Queue sender, EventArgs e)
{
eina.Slice slice = sender.GetSlice();
// Can be caused when we issue efl.io.Queue.Clear()
if (slice.Len == 0) return;
// If the server didn't send us the line terminator and closed the
// connection (ie: efl_io_reader_eos_get() == true) or if the buffer
// limit was reached then we may have a line without a trailing delimiter.
// if (slice.EndsWith(delimiter)) // TODO missing
// slice.Len -= delimiter.Len;
// Console.WriteLine("INFO: received '{0}'", EINA_SLICE_STR_PRINT(slice)); // TODO missing
sender.Clear();
CommandNext();
}
void DialerConnected(efl.net.dialer.Tcp sender, EventArgs e)
{
Console.WriteLine("INFO: connected to {0} ({1})", sender.GetAddressDial(), sender.GetAddressRemote());
CommandNext();
}
void CopierDone(efl.io.Copier sender, EventArgs e)
{
Console.WriteLine("INFO: {0} done", sender.GetName());
// waiting.Remove(sender); // TODO missing
if (waiting.Empty())
Quit(EXIT_SUCCESS);
}
void CopierError(efl.io.Copier sender, eina.Error perr)
{
Console.Error.WriteLine(stderr, "INFO: {0} error: #{1} '{2}'", sender.GetName(), perr, perr.Message);
Quit(EXIT_FAILURE);
}
private static void SetCopierCbs(efl.io.Copier copier)
{
copier.DONE += CopierDone;
copier.ERROR += CopierError;
}
public ExampleRunner()
{
string address = "example.com:80";
ulong buffer_limit = 128;
efl.io.Queue send_queue, receive_queue;
commands = new eina.List<string>();
commands.Append("HEAD / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n");
// delimiter = (Eina_Slice)EINA_SLICE_STR("\r\n"); // TODO missing
// Without a send_queue we'd have to manually implement an
// efl.io.Reader object that would provide partial data when
// efl.io.Reader.read() is called by efl.io.Copier. This is
// cumbersome... we just want to write a full command and have the
// queue to handle that for us.
//
// Our example's usage is to write each command at once followed by
// the line delimiter, then wait for a reply from the server, then
// write another.
try
{
send_queue = new efl.io.QueueConcrete(null, (efl.io.Queue equeue) => {
equeue.SetName("send_queue");
equeue.SetLimit(buffer_limit);
});
}
catch
{
Console.Error.WriteLine("ERROR: could not create efl.io.Queue (send)");
Quit(EXIT_FAILURE);
throw;
}
// Without a receive_queue we'd have to manually implement an
// efl.io.Writer object that would handle write of partial data
// with efl.io.Writer.write() is called by efl.io.Copier.
//
// For output we could have another solution as well: use null
// destination and handle "line" or "data" events manually,
// stealing the buffer so it doesn't grow.
//
// Our example's usage is to peek its data with GetSlice() then
// Clear().
try
{
receive_queue = new efl.io.QueueConcrete(null, (efl.io.Queue equeue) => {
equeue.SetName("receive_queue");
equeue.SetLimit(buffer_limit);
});
receive_queue.SLICE_CHANGED += ReceiverData;
}
catch
{
Console.Error.WriteLine("ERROR: could not create efl.io.Queue (receive)");
Quit(EXIT_FAILURE);
throw;
}
// some objects such as the Efl.Io.Copier and Efl.Net.Dialer.Tcp
// depend on main loop, thus their parent must be a loop
// provider. We use the loop passed to our main method.
// efl.Loop loop = ev->object; // TODO missing
// The TCP client to use to send/receive network data
try
{
dialer = new efl.net.dialer.TcpConcrete(loop, (efl.net.dialer.Tcp edialer) => {
edialer.SetName("dialer");
});
dialer.CONNECTED += DialerConnected;
}
catch
{
Console.Error.WriteLine("ERROR: could not create efl.net.dialer.Tcp");
Quit(EXIT_FAILURE);
throw;
}
// sender: send_queue->network
try
{
sender = new efl.io.CopierConcrete(loop, (efl.io.Copier esender) => {
esender.SetName("sender");
esender.SetLineDelimiter(delimiter);
esender.SetSource(send_queue);
esender.SetDestination(dialer);
});
SetCopierCbs(sender);
}
catch
{
Console.Error.WriteLine("ERROR: could not create efl.io.Copier (sender)");
Quit(EXIT_FAILURE);
throw;
}
// receiver: network->receive_queue
try
{
receiver = new efl.io.CopierConcrete(loop, (efl.io.Copier ereceiver) => {
ereceiver.SetName("receiver");
ereceiver.SetLineDelimiter(delimiter);
ereceiver.SetSource(dialer);
ereceiver.SetDestination(send_queue);
});
SetCopierCbs(receiver);
}
catch
{
Console.Error.WriteLine("ERROR: could not create Efl_Io_Copier (receiver)");
Quit(EXIT_FAILURE);
throw;
}
eina.Error err = dialer.Dial(address);
if (err != eina.Error.NO_ERROR)
{
var msg = $"ERROR: could not dial {address}: {err.Message}";
Console.Error.WriteLine(msg);
Quit(EXIT_FAILURE);
throw new SEHException(msg);
}
waiting.Append(sender);
waiting.Append(receiver);
}
}
public static class Example
{
public static void Main()
{
efl.All.Init(efl.Components.Basic);
var exr = new ExampleRunner();
exr.Run();
efl.All.Shutdown();
}
}

View File

@ -1,181 +0,0 @@
/*
* Efl.Net buffered input/output examples.
*
* This example builds on the net_io example by using a buffered_stream to
* simplify the logic. This helpfully provides the input and output queues
* and a copier internally. They can be accessed from the buffered stream
* if required but as demonstrated here that is likely not necessary.
*/
using System;
public class ExampleRunner
{
private eina.List<string> commands = null;
private eina.Slice delimiter;
private efl.net.dialer.Tcp dialer = null;
private efl.io.buffered.Stream stream = null;
public void Run()
{
efl.ui.Config.Run();
}
public void Quit(int retval)
{
if (stream != null)
{
stream.Close();
stream.Dispose();
stream = null;
}
if (dialer != null)
{
dialer.Dispose();
dialer = null;
}
// efl_exit(retval); TODO missing
efl.ui.Config.Exit();
}
public void CommandNext()
{
if (commands.Empty())
{
stream.EosMark();
return;
}
string cmd = commands[0];
// commands.RemoveAt(0); // TODO missing
// eina.Slice slice = (Eina_Slice)EINA_SLICE_STR(cmd); // TODO missing
stream.Write(slice, null);
// Console.Error.WriteLine("INFO: sent '{0}'", EINA_SLICE_STR_PRINT(slice)); // TODO missing
// don't use delimiter directly, 'Len' may be changed!
slice = delimiter;
stream.Write(slice, null);
}
void StreamLine(efl.io.buffered.Stream sender, EventArgs e)
{
eina.Slice slice = sender.GetSlice();
// Can be caused when we issue efl.io.buffered.Stream.Clear()
if (slice.Len == 0) return;
// If the server didn't send us the line terminator and closed the
// connection (ie: efl_io_reader_eos_get() == true) or if the buffer
// limit was reached then we may have a line without a trailing delimiter.
// if (slice.EndsWith(delimiter)) // TODO missing
// slice.Len -= delimiter.Len;
// Console.WriteLine("INFO: received '{0}'", EINA_SLICE_STR_PRINT(slice)); // TODO missing
sender.Clear();
CommandNext();
}
void DialerConnected(efl.net.dialer.Tcp sender, EventArgs e)
{
Console.WriteLine("INFO: connected to {0} ({1})", sender.GetAddressDial(), sender.GetAddressRemote());
CommandNext();
}
void StreamDone(efl.io.buffered.Stream sender, EventArgs e)
{
Console.WriteLine("INFO: {0} done", sender.GetName());
Quit(EXIT_SUCCESS);
}
void StreamError(efl.io.buffered.Stream sender, eina.Error err)
{
Console.Error.WriteLine("INFO: {0} error: #{1} '{2}'", sender;GetName(), err, err.Message);
Quit(EXIT_FAILURE);
}
private static void SetStreamCbs(efl.io.buffered.Stream s)
{
s.LINE += StreamLine;
s.EOS += StreamDone;
s.ERROR += StreamError;
}
public ExampleRunner()
{
string address = "example.com:80";
ulong bufferLimit = 128;
commands = new eina.List<string>();
commands.Append("HEAD / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n");
// delimiter = (Eina_Slice)EINA_SLICE_STR("\r\n"); // TODO missing
// some objects such as the Efl.Io.Copier and Efl.Net.Dialer.Tcp
// depend on main loop, thus their parent must be a loop
// provider. We use the loop passed to our main method.
// efl.Loop loop = ev->object; // TODO missing
// The TCP client to use to send/receive network data
try
{
dialer = new efl.net.dialer.TcpConcrete(loop, (efl.net.dialer.Tcp edialer) => {
edialer.SetName("dialer");
});
dialer.CONNECTED += DialerConnected;
}
catch
{
Console.Error.WriteLine("ERROR: could not create efl.net.dialer.Tcp");
Quit(EXIT_FAILURE);
throw;
}
// Without the buffered stream we'd have to create two Efl.Io.Queue
// ourselves, as well as two Efl.Io.Copier to link them with the
// dialer.
//
// Our example's usage is to write each command at once followed by
// the line delimiter, then wait for a reply from the server, then
// write another.
//
// On incoming data we peek at it with GetSlice() and then Clear().
stream = new efl.io.buffered.StreamConcrete(loop, (efl.io.buffered.Stream estream) => {
estream.SetName("stream");
estream.SetInnerIo(dialer);
estream.SetDelimiter(delimiter);
estream.SetMaxQueueSizeInput(bufferLimit);
estream.SetMaxQueueSizeOutput(bufferLimit);
});
SetStreamCbs(stream);
eina.Error err = dialer.Dial(address);
if (err != eina.Error.NO_ERROR)
{
var msg = $"ERROR: could not dial {address}: {err.Message}";
Console.Error.WriteLine(msg);
Quit(EXIT_FAILURE);
throw new SEHException(msg);
}
}
}
public class Example
{
public static void Main()
{
efl.All.Init(efl.Components.Basic);
var exr = new ExampleRunner();
exr.Run();
efl.All.Shutdown();
}
}

View File

@ -1,135 +0,0 @@
/*
* Efl.Net session/connectivity examples.
*
* NOTE: This example currently requires the Connman backend to be running.
*
* This example uses the Efl.Net.Session APIs to get connectivity information
* about the current networking setup. It then sets up a callback for network
* changes and will print the details on any change.
*/
using System;
public class Example
{
// Convert a session state to a string for printing.
public static string StateName(efl.net.session.State state)
{
switch (state)
{
case efl.net.session.State.Offline:
return "offline";
case efl.net.session.State.Local:
return "local";
case efl.net.session.State.Online:
return "online";
default:
return "???";
}
}
private static readonly Dictionary<efl.net.session.Technology, string> names =
new Dictionary<efl.net.session.Technology, string> {
{ efl.net.session.Technology.Unknown, "unknown" },
{ efl.net.session.Technology.Ethernet, "ethernet" },
{ efl.net.session.Technology.Wifi, "wifi" },
{ efl.net.session.Technology.Bluetooth, "bluetooth" },
{ efl.net.session.Technology.Cellular, "cellular" },
{ efl.net.session.Technology.Vpn, "vpn" },
{ efl.net.session.Technology.Gadget, "gadget" }
};
// Convert a session technology to a string for printing.
public static string TechnologyName(efl.net.session.Technology tech)
{
string name;
if (!names.TryGetValue(tech, out name))
return "???";
return name;
}
// Tthe callback that indicates some connectivity changed within the session.
// Print information about the session to the console.
static void SessionChanged(efl.net.Session session, EventArgs e)
{
Console.WriteLine("Session changed:");
Console.WriteLine(" name: '{0}'", session.GetName());
Console.WriteLine(" state: {0}", StateName(session.GetState()));
Console.WriteLine(" technology: {0}", TechnologyName(session.GetTechnology()));
Console.WriteLine(" interface: '{0}'", session.GetInterface());
// print out additional information if we have an IPv4 session
string ip, netmask, gateway;
session.GetIpv4(out ip, out netmask, out gateway);
if (ip != null)
{
Console.WriteLine($" IPv4: {ip}, gateway={gateway}, netmask={netmask}");
}
// print out additional information if we have an IPv6 session
byte prefix;
session.GetIpv6(out ip, out prefix, out netmask, out gateway);
if (ip != null)
{
Console.WriteLine($" IPv6: {ip}/{prefix}, gateway={gateway}, netmask={netmask}");
}
}
// Quit the app after a timer tick.
static void QuitCb(object sender, EventArgs e)
{
// efl_exit(0); // TODO missing
efl.ui.Config.Exit();
}
public static void Main()
{
bool doConnect = true;
bool requireOnline = false;
efl.All.Init(efl.Components.Basic);
// efl.Loop loop = ev->object; // TODO missing
// create a session that watches specifically for ethernet, wifi and bluetooth
int technologies = efl.net.session.Technology.Ethernet |
efl.net.session.Technology.Wifi | efl.net.session.Technology.Bluetooth;
try
{
efl.net.Session session = new efl.net.SessionConcrete(loop, (efl.net.Session esession) => {
esession.SetName("Example Session");
// register the change callback for network state
esession.CHANGED += SessionChanged;
});
}
catch
{
eina.Log.Error("Could not create Efl.Net.Session object.\n");
// efl_exit(EXIT_FAILURE); // TODO missing
efl.ui.Config.Exit();
throw;
}
if (doConnect)
{
Console.WriteLine("Requesting a {0} connection.", requireOnline ? "online" : "local");
session.Connect(requireOnline, technologies);
}
Console.WriteLine("The session will remain active while this application runs.");
Console.WriteLine("Use ^C (Control + C) to close it");
// Wait for 10 seconds before exiting this example
new efl.loop.TimerConcrete(loop, (efl.loop.Timer etimer) => {
etimer.SetInterval(10.0);
etimer.TICK += QuitCb;
});
// start the main loop
efl.ui.Config.Run();
efl.All.Shutdown();
}
}

View File

@ -0,0 +1,17 @@
Efl.Ui.AlertPopup alertPopup = new Efl.Ui.AlertPopup(parent);
alertPopup.SetButton(Efl.Ui.AlertPopupButton.Positive, "Accept", null);
alertPopup.SetButton(Efl.Ui.AlertPopupButton.Negative, "Reject", null);
alertPopup.ButtonClickedEvent += (sender, args) =>
{
if (args.arg.Button_type.Equals(Efl.Ui.AlertPopupButton.Positive))
Console.WriteLine("Positive action invoked");
else if (args.arg.Button_type.Equals(Efl.Ui.AlertPopupButton.Negative))
Console.WriteLine("Negative action invoked");
};
alertPopup.BackwallClickedEvent += (s, e) =>
{
Console.WriteLine("Backwall clicked");
};

View File

@ -0,0 +1,6 @@
Efl.Ui.Bg bg = new Efl.Ui.Bg(parent);
bg.Color = (66, 162, 206, 255);
bg.SetFile(image_path + "background.png");
bg.Load();

View File

@ -0,0 +1,10 @@
Efl.Ui.Box box = new Efl.Ui.Box(parent);
//Creating content which we will pack into the box
//It can be any widget, for example, buttons
Efl.Ui.Button button1 = new Efl.Ui.Button(box);
Efl.Ui.Button button2 = new Efl.Ui.Button(box);
//Packing the content to the box, one after another
box.Pack(button1);
box.Pack(button2);

View File

@ -0,0 +1,9 @@
Efl.Ui.Button button = new Efl.Ui.Button(parent);
button.Text = "Test Button";
button.ClickedEvent += (sender, args) =>
{
Efl.Ui.Button btn = (Efl.Ui.Button)sender;
btn.Text = "Clicked";
};

View File

@ -0,0 +1,12 @@
Efl.Ui.Check check = new Efl.Ui.Check(parent);
check.Text = "Test Check";
check.SetSelected(true);
check.SelectedChangedEvent += (sender, args) =>
{
if (check.Selected)
Console.WriteLine("Check is selected");
else
Console.WriteLine("Check is not selected");
};

View File

@ -0,0 +1,11 @@
Efl.Ui.Datepicker datepicker = new Efl.Ui.Datepicker(parent);
datepicker.SetDateMin(2000, 1, 1);
datepicker.SetDateMax(2030, 1, 1);
datepicker.SetDate(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
datepicker.DateChangedEvent += (sender, args) =>
{
datepicker.GetDate(out int year, out int month, out int day);
Console.WriteLine("Date has been changed! Current date: " + year + "-" + month + "-" + day);
};

View File

@ -0,0 +1,4 @@
Efl.Ui.Image image = new Efl.Ui.Image(parent);
image.SetFile(image_path + "icon.png");
image.Load();

View File

@ -0,0 +1,12 @@
Efl.Ui.Popup popup = new Efl.Ui.Popup(parent);
Efl.Ui.Button button = new Efl.Ui.Button(parent);
button.Text = "Click to hide the popup";
button.ClickedEvent += (sender, args) =>
{
popup.SetVisible(false);
};
popup.SetContent(button);

View File

@ -0,0 +1,11 @@
Efl.Ui.Progressbar progressbar = new Efl.Ui.Progressbar(parent);
// You can choose the range limits according to your needs.
// It can be percentage, but it can be also different value (e.g. number of files to be copied)
progressbar.SetRangeLimits(0.0, 100.0);
// Setting initial progress value
progressbar.RangeValue = 0;
// When progress is made you should modify the RangeValue:
progressbar.RangeValue = 33;

View File

@ -0,0 +1,14 @@
Efl.Ui.RadioBox radioBox = new Efl.Ui.RadioBox(parent);
for (int i = 1; i <= 3; i++)
{
Efl.Ui.Radio radio = new Efl.Ui.Radio(radioBox);
radio.Text = "Choice no. " + i;
radio.SetStateValue(i);
radioBox.Pack(radio);
}
radioBox.ValueChangedEvent += (sender, args) =>
{
System.Console.WriteLine("RadioBox value changed! Current choice value: " + args.arg);
};

View File

@ -0,0 +1,10 @@
Efl.Ui.Scroller scroller = new Efl.Ui.Scroller(parent);
// Create a large image to put it inside the scroller
Efl.Ui.Image image = new Efl.Ui.Image(scroller);
image.HintSizeMin = new Eina.Size2D(1000, 1000);
image.SetFile(image_path + "image.png");
image.Load();
scroller.SetContent(image);

View File

@ -0,0 +1,16 @@
Efl.Ui.Slider slider = new Efl.Ui.Slider(parent);
slider.SetRangeLimits(0, 100);
slider.SetRangeValue(50);
// You get this event every time the slider moves
slider.ChangedEvent += (sender, args) =>
{
Console.WriteLine("Current slider value is: " + slider.GetRangeValue());
};
// You only get this event once the slider is stable
slider.SteadyEvent += (sender, args) =>
{
Console.WriteLine("STEADY slider value is: " + slider.GetRangeValue());
};

View File

@ -0,0 +1,13 @@
Efl.Ui.SpinButton spinButton = new Efl.Ui.SpinButton(parent);
spinButton.Orientation = Efl.Ui.LayoutOrientation.Vertical;
spinButton.SetRangeLimits(0, 100);
spinButton.SetRangeStep(2);
spinButton.SetRangeValue(50);
spinButton.ChangedEvent += (sender, args) =>
{
Efl.Ui.SpinButton spnBtn = (Efl.Ui.SpinButton)sender;
Console.WriteLine("Range value changed to: " + spnBtn.RangeValue);
};

View File

@ -0,0 +1,10 @@
Efl.Ui.Table table = new Efl.Ui.Table(parent);
table.SetTableSize(2, 2);
Efl.Ui.Button button1 = new Efl.Ui.Button(table);
Efl.Ui.Button button2 = new Efl.Ui.Button(table);
// The first column and row have indexes = 0.
table.PackTable(button1, 0, 0, 1, 1);
table.PackTable(button2, 1, 1, 1, 1);

View File

@ -0,0 +1,3 @@
var win = new Efl.Ui.Win(Efl.App.AppMain);
win.FocusHighlightEnabled = true;

View File

@ -0,0 +1,8 @@
var win = new Efl.Ui.Win(Efl.App.AppMain);
win.SetWinType(Efl.Ui.WinType.Basic);
win.Text = "Hello World";
win.Autohide = true;
win.VisibilityChangedEvent +=
(sender, args) => { };

View File

@ -0,0 +1,9 @@
Place code snippets in this folder.
If the file name matches a class name (like Efl.Ui.Win) or a property name (like Efl.Ui.Win.FocusHighlightEnabled)
the mono documentation generator (DocFX) will pick up the content of the file and embed it.
Two file formats are supported:
- Plain code (files with .cs extension): Code snippets are copied into the documentation inside <example> and <code>
tags.
- XML text (files with .xml extension): This allows including explanatory text besides the code snippets, but the file
must include the ESCAPED \<example\> and \<code\> tags. Escaping is accomplished by adding a backslash in front of
angle brackets. Quotes must be escaped too: \"

View File

@ -0,0 +1,9 @@
project(
'snippets', 'cs',
version : '0.0.1',
meson_version : '>= 0.38.0')
efl_mono = dependency('efl-mono', version : '>=1.20.99')
efl_mono_libs = efl_mono.get_pkgconfig_variable('mono_libs')

View File

@ -0,0 +1,79 @@
using System;
public class Example : Efl.Csharp.Application
{
public static void FocusChangedCb(object sender, EventArgs e)
{
Console.WriteLine($"Focus for object {((Efl.IText)sender).Text} changed to {((Efl.Ui.Widget)sender).Focus}");
}
protected override void OnInitialize(string[] args)
{
// Create a window and initialize it
var win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
win.Text = "Focus example";
win.Autohide = true;
win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => {
// Exit the EFL main loop
if (e.Arg == false)
Efl.Ui.Config.Exit();
};
// Create the main box container
var vbox = new Efl.Ui.Box(win);
vbox.HintSizeMin = new Eina.Size2D(360, 240);
win.Content = vbox;
// Create some check boxes
Efl.Ui.Check first_checkbox = null;
for (int i = 0; i< 5; i++) {
var checkbox = new Efl.Ui.Check(vbox);
checkbox.Text = "Check " + i;
checkbox.HintFill = (false, false);
checkbox.HintAlign = ((Efl.Gfx.Align)0.5, (Efl.Gfx.Align)0.5);
checkbox.FocusChangedEvent += FocusChangedCb;
vbox.Pack(checkbox);
if (i == 0) first_checkbox = checkbox;
};
// Create an horizontal box to contain the two buttons
var hbox = new Efl.Ui.Box(vbox);
hbox.Orientation = Efl.Ui.LayoutOrientation.Horizontal;
vbox.Pack(hbox);
// Create a "Focus Mover" button
var button = new Efl.Ui.Button(hbox);
button.Text = "Focus mover";
button.FocusChangedEvent += FocusChangedCb;
button.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => {
Console.WriteLine("Clicked Focus Mover");
// Manually transfer focus to the first check box
Efl.Ui.Focus.Util.Focus(first_checkbox);
};
hbox.Pack(button);
// Create a Quit button
button = new Efl.Ui.Button(hbox);
button.Text = "Quit";
button.FocusChangedEvent += FocusChangedCb;
button.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => {
Console.WriteLine("Clicked Quit");
Efl.Ui.Config.Exit();
};
hbox.Pack(button);
// Show the focus highlight
win.FocusHighlightEnabled = true;
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch();
}
}

View File

@ -13,3 +13,17 @@ executable('efl_reference_ui_container',
cs_args : efl_mono_libs,
install : true
)
executable('efl_reference_ui_focus',
files(['focus_main.cs']),
dependencies : deps,
cs_args : efl_mono_libs,
install : true
)
executable('efl_reference_ui_custom_widget',
files(['ui_custom_widget.cs']),
dependencies : deps,
cs_args : efl_mono_libs,
install : true
)

View File

@ -1,60 +1,30 @@
/*
* Efl.UI container exmaples.
* Efl.UI container examples.
*
* Load and pack a selection of containers.
* Each has it's own unique layout and methods which are demonstrated below.
* Each has its own unique layout and methods which are demonstrated below.
*/
using System;
public class Example
public class Example : Efl.Csharp.Application
{
// quit the app, called if the user clicks the Quit button or the window is hidden
static void GuiQuitCb(object sender, EventArgs e)
// Create a box container full of buttons
static Efl.Ui.Box CreateBox(Efl.Ui.Win win)
{
efl.ui.Config.Exit();
}
// Load a simple table layout into the window
static efl.ui.Table SetupUiTable(efl.ui.Win win)
{
efl.ui.Table table = new efl.ui.TableConcrete(win);
table.SetTableColumns(2);
table.SetTableDirection(efl.ui.Dir.Right, efl.ui.Dir.Down);
efl.ui.Button button = new efl.ui.ButtonConcrete(win);
button.SetText("Long Button");
table.PackTable(button, 0, 2, 2, 1);
Efl.Ui.Box box = new Efl.Ui.Box(win);
// Set distance between contained elements
box.ContentPadding = (5, 0);
for (int i = 1; i <= 4; ++i)
{
efl.ui.Button btn = new efl.ui.ButtonConcrete(win);
btn.SetText($"Table {i}");
table.Pack(btn);
}
return table;
}
// Load some boxes - a horizontal one for the window layout and a vertical
// one to contain a flow
static efl.ui.Box SetupUiBoxes(efl.ui.Win win)
{
efl.ui.Box box = new efl.ui.BoxConcrete(win);
box.SetPackPadding(5, 0, true);
for (int i = 1; i <= 4; ++i)
{
efl.ui.Button button = new efl.ui.ButtonConcrete(win);
button.SetText($"Boxed {i}");
// Add 4 buttons, one below the other
var button = new Efl.Ui.Button(win);
button.Text = $"Boxed {i}";
if (i == 2)
{
eina.Size2D sz;
sz.W = 100;
sz.H = 50;
button.SetHintMax(sz);
// Button 2 has its maximum size limited, so it will be smaller
button.HintSizeMax = new Eina.Size2D(100,50);
}
box.Pack(button);
}
@ -62,51 +32,86 @@ public class Example
return box;
}
// Create a simple table layout
static Efl.Ui.Table CreateTable(Efl.Ui.Win win)
{
Efl.Ui.Table table = new Efl.Ui.Table(win);
// Table with two columns, that get filled left to right, and then top to bottom
table.TableColumns = 2;
table.Orientation = Efl.Ui.LayoutOrientation.Horizontal;
Efl.Ui.Button button;
for (int i = 1; i <= 4; ++i)
{
// Add 4 buttons, following the defined table flow
button = new Efl.Ui.Button(win);
button.Text = $"Table {i}";
table.Pack(button);
}
// Last button spans two table cells
button = new Efl.Ui.Button(win);
button.Text = "Long Button";
table.PackTable(button, 0, 2, 2, 1);
return table;
}
protected override void OnInitialize(string[] args)
{
// Create a window and initialize it
Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
win.Text = "Container demo";
win.Autohide = true;
win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => {
// Exit the EFL main loop
if (e.Arg == false)
Efl.Ui.Config.Exit();
};
// Give the window an initial size so there is room to resize the panes.
// Otherwise, all widgets are tightly packed
win.Size = new Eina.Size2D(350,250);
// Create a vertically-split panes container
Efl.Ui.Panes vsplit = new Efl.Ui.Panes(win);
vsplit.SplitRatio = 0.75;
win.Content = vsplit;
// Create some boxes and set them as the content of the first pane of the container
var box = CreateBox(win);
vsplit.FirstPart.Content = box;
// Create a second, horizontally-split panes container and set it as the content of
// the second pane of the first container
Efl.Ui.Panes hsplit = new Efl.Ui.Panes(win);
hsplit.Orientation = Efl.Ui.LayoutOrientation.Horizontal;
hsplit.SplitRatio = 0.85;
vsplit.SecondPart.SetContent(hsplit);
// Create a table and set it as the content of the first pane of the horizontal
// container
var table = CreateTable(win);
hsplit.FirstPart.SetContent(table);
// Create a button and set it as the content of the second pane of the horizontal
// container
Efl.Ui.Button quit_btn = new Efl.Ui.Button(win);
quit_btn.Text = "Quit";
quit_btn.HintSizeMax = new Eina.Size2D(150, 30);
quit_btn.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => {
// Exit the EFL main loop
Efl.Ui.Config.Exit();
};
hsplit.SecondPart.SetContent(quit_btn);
}
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
efl.All.Init(efl.Components.Ui);
efl.ui.Win win = new efl.ui.WinConcrete(null, (efl.ui.Win ewin) => {
ewin.SetWinType(efl.ui.win.Type.Basic);
ewin.SetText("Hello World");
ewin.SetAutohide(true);
});
eina.Size2D sz;
sz.W = 350;
sz.H = 250;
win.SetSize(sz);
// when the user clicks "close" on a window there is a request to hide
win.HIDE += GuiQuitCb;
// Load a vertical and horizontal split into the window
efl.ui.Panes split = new efl.ui.PanesConcrete(win);
split.SetSplitRatio(0.75);
win.SetContent(split);
var boxes = SetupUiBoxes(win);
efl.ContentConcrete.static_cast(split.Part("first")).SetContent(boxes);
efl.ui.Panes horiz_split = new efl.ui.PanesConcrete(win);
horiz_split.SetDirection(efl.ui.Dir.Horizontal);
horiz_split.SetSplitRatio(0.85);
efl.ContentConcrete.static_cast(split.Part("second")).SetContent(horiz_split);
var table = SetupUiTable(win);
efl.ContentConcrete.static_cast(horiz_split.Part("first")).SetContent(table);
efl.ui.Button quit_btn = new efl.ui.ButtonConcrete(win);
quit_btn.SetText("Quit");
sz.W = 150;
sz.H = 30;
quit_btn.SetHintMax(sz);
quit_btn.CLICKED += GuiQuitCb;
efl.ContentConcrete.static_cast(horiz_split.Part("second")).SetContent(quit_btn);
// Start event loop
efl.ui.Config.Run();
efl.All.Shutdown();
var example = new Example();
example.Launch();
}
}

View File

@ -0,0 +1,64 @@
/*
* Efl.UI custom widget examples.
*
* Inherit from an EFL C# class and customize it
*/
using System;
// This is our own button with customized text functions
public class MyButton : Efl.Ui.Button
{
// This id shows how our data is preserved when overriden methods
// are called from native code
private int button_id;
// Constructor sets an initial text
public MyButton(Efl.Object parent, int id = 0) :
base(parent)
{
button_id = id;
base.Text = "Base text for button id " + id;
}
// This calls the parent's SetText() method with a modified string
public override string Text
{
set {
base.Text = "Overriden text for button id " + button_id + ": " + value;
}
}
}
public class Example : Efl.Csharp.Application
{
protected override void OnInitialize(string[] args)
{
// Create a window and initialize it
Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
win.Text = "Custom widget demo";
win.Autohide = true;
win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => {
// Exit the EFL main loop when the window is closed
if (e.Arg == false)
Efl.Ui.Config.Exit();
};
// Give the window an initial size
win.Size = new Eina.Size2D(350,250);
// Instantiate our custom button widget
MyButton btn = new MyButton(win, 99);
btn.ClickedEvent += (object sender, Efl.Input.ClickableClickedEventArgs e) => {
// When the button is clicked, change its text
MyButton b = (MyButton)sender;
b.Text = "Hello!";
};
win.SetContent(btn);
}
public static void Main()
{
var example = new Example();
example.Launch();
}
}

View File

@ -2,58 +2,55 @@
* Efl.UI sizing examples.
*
* Demonstrate how to use the sizing api from Efl.Gfx.
* We load a box with 3 buttons, one with default sizing, one that has a max
* and the last has a min size. Try resizing the window to see how this changes.
* We load a box with 3 buttons, one with default sizing, one that has a max size
* and the last one has a min size. Try resizing the window to see how this changes.
*/
using System;
public class Example
public class Example : Efl.Csharp.Application
{
public static void Main()
protected override void OnInitialize(string[] args)
{
efl.All.Init(efl.Components.Ui);
efl.ui.Win win = new efl.ui.WinConcrete(null, (efl.ui.Win ewin) => {
ewin.SetWinType(efl.ui.win.Type.Basic);
ewin.SetText("Size Control");
ewin.SetAutohide(true);
});
eina.Size2D sz;
sz.W = 320;
sz.H = 320;
win.SetSize(sz);
// when the user clicks "close" on a window there is a request to hide
win.HIDE += (object sender, EventArgs e) => {
// quit the app, called if the window is hidden
efl.ui.Config.Exit();
// Create a window and initialize it
Efl.Ui.Win win = new Efl.Ui.Win(null, winType: Efl.Ui.WinType.Basic);
win.Text = "Size Control";
win.Autohide = true;
win.VisibilityChangedEvent += (object sender, Efl.Gfx.EntityVisibilityChangedEventArgs e) => {
// Exit the EFL main loop
if (e.Arg == false)
Efl.Ui.Config.Exit();
};
efl.ui.Box box = new efl.ui.BoxConcrete(win);
// Create a box container
Efl.Ui.Box box = new Efl.Ui.Box(win);
win.SetContent(box);
efl.ui.Button button = new efl.ui.ButtonConcrete(win);
button.SetText("Button");
// Create a regular button (without size hints)
var button = new Efl.Ui.Button(win);
button.Text = "Button";
box.Pack(button);
efl.ui.Button small_btn = new efl.ui.ButtonConcrete(win);
small_btn.SetText("Small");
sz.W = 50;
sz.H = 50;
small_btn.SetHintMax(sz);
box.Pack(small_btn);
// Create a small button (max size is limited)
button = new Efl.Ui.Button(win);
button.Text = "Small";
button.HintSizeMax = new Eina.Size2D(50,50);
box.Pack(button);
efl.ui.Button big_btn = new efl.ui.ButtonConcrete(win);
big_btn.SetText("Big Button");
sz.W = 100;
sz.H = 100;
big_btn.SetHintMin(sz);
box.Pack(big_btn);
// Create a big button (min size is limited)
button = new Efl.Ui.Button(win);
button.Text = "Big button";
button.HintSizeMin = new Eina.Size2D(100,100);
box.Pack(button);
}
efl.ui.Config.Run();
efl.All.Shutdown();
#if WIN32
[STAThreadAttribute()]
#endif
public static void Main()
{
var example = new Example();
example.Launch();
}
}

69
setup.py Executable file
View File

@ -0,0 +1,69 @@
#!/usr/bin/python3
import os
import subprocess
from string import Template
supported_languages = ["c"]
directories = ["apps", "reference", "tutorial"] # "examples", "legacy-examples"
goals = []
subprojects = []
if subprocess.call("pkg-config --exists efl-mono", shell=True) == 0:
supported_languages += ["csharp"]
else:
print("Disable c# bindings")
if subprocess.call("pkg-config --exists eina-cxx", shell=True) == 0:
supported_languages += ["cxx"]
else:
print("Disable c++ bindings")
class SubProjectGoal:
def __init__(self, language, path):
self.language = language
self.path = path
def verify(self):
assert os.path.isdir(self.path)
assert os.path.isfile(os.path.join(self.path, 'meson.build'))
def flush(self):
os.symlink(os.path.join('..', self.path), os.path.realpath(os.path.join('subprojects', self.link_file_name())))
def link_file_name(self):
return self.language+'-'+os.path.basename(self.path)
for directory in directories:
for lang in supported_languages:
explore_dir = os.path.join(directory, lang)
if os.path.isdir(explore_dir):
meson_build_file = os.path.join(explore_dir, "meson.build")
if os.path.isfile(meson_build_file):
goals.append(SubProjectGoal(lang, explore_dir))
else:
for content in os.listdir(explore_dir):
sub = os.path.join(explore_dir, content)
if os.path.isdir(sub):
goals.append(SubProjectGoal(lang, sub))
if not os.path.isdir('./subprojects'):
os.mkdir('./subprojects')
else:
for content in os.listdir('./subprojects'):
os.unlink(os.path.join('subprojects', content))
for subproject in goals:
subproject.verify()
subproject.flush()
subprojects.append(subproject.link_file_name())
content = { 'subprojects' : '[\''+'\',\''.join(subprojects)+'\']'}
meson_in = open('meson.build.in')
meson_temp = Template(meson_in.read())
content = meson_temp.substitute(content)
if os.path.isfile('meson.build'):
os.unlink('meson.build')
meson_out = open('meson.build', 'a')
meson_out.write(content)

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>

View File

@ -1,4 +1,4 @@
class Example.Rectangle (Efl.Object) {
class Example.Rectangle extends Efl.Object {
methods {
@property width {
set {

View File

@ -8,7 +8,7 @@ foreach eo : eo_src
eo_file = eo + '.eo'
eo_csrc += eo + '.c'
eo_gen += custom_target('eolian_gen_' + eo_file,
eo_gen += custom_target('eolian_gen_eo_classes' + eo_file,
input : eo_file,
output : [eo_file + '.h'],
command : [eolian_gen, '-I', meson.current_source_dir(),

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>

View File

@ -1,5 +1,8 @@
class Example.Rectangle (Efl.Object) {
[[A rectangle shape object]]
class Example.Rectangle extends Efl.Object {
[[A rectangle shape object
@since 1.00
]]
methods {
@property width {
[[The width of this rectangle]]

View File

@ -1,5 +1,8 @@
class Example.Square (Example.Rectangle) {
[[A square shape object]]
class Example.Square extends Example.Rectangle {
[[A square shape object
@since 1.00
]]
implements {
Example.Rectangle.width {set;}
Example.Rectangle.height {set;}

View File

@ -8,7 +8,7 @@ foreach eo : eo_src
eo_file = eo + '.eo'
eo_csrc += eo + '.c'
eo_gen += custom_target('eolian_gen_' + eo_file,
eo_gen += custom_target('eolian_gen_eo_inherit' + eo_file,
input : eo_file,
output : [eo_file + '.h'],
command : [eolian_gen, '-I', meson.current_source_dir(),

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
@ -13,15 +12,15 @@ static void
_obj_create()
{
// First create a root element
_root = efl_new(EFL_MODEL_ITEM_CLASS,
_root = efl_new(EFL_GENERIC_MODEL_CLASS,
efl_name_set(efl_added, "Root"));
// Create the first child element
_child1 = efl_add(EFL_MODEL_ITEM_CLASS, _root,
_child1 = efl_add(EFL_GENERIC_MODEL_CLASS, _root,
efl_name_set(efl_added, "Child1"));
// Create the second child element, this time, with an extra reference
_child2 = efl_add_ref(EFL_MODEL_ITEM_CLASS, _root,
_child2 = efl_add_ref(EFL_GENERIC_MODEL_CLASS, _root,
efl_name_set(efl_added, "Child2"));
}

View File

@ -1,4 +1,3 @@
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>

View File

@ -1,5 +1,8 @@
class Example.Circle (Efl.Object, Example.Shape) {
[[A circle shape object]]
class Example.Circle extends Efl.Object implements Example.Shape {
[[A circle shape object
@since 1.00
]]
methods {
@property radius {
[[The radius of this circle]]

View File

@ -1,5 +1,8 @@
mixin Example.Colored {
[[A mixin for providing APIs for managing colour properties]]
[[A mixin for providing APIs for managing colour properties
@since 1.00
]]
methods {
@property color {
[[The colour to associate with the class we are coloring.

View File

@ -1,5 +1,8 @@
class Example.Rectangle (Efl.Object, Example.Shape, Example.Colored) {
[[A rectangle shape object]]
class Example.Rectangle extends Efl.Object implements Example.Shape, Example.Colored {
[[A rectangle shape object
@since 1.00
]]
methods {
@property width {
[[The width of this rectangle]]

View File

@ -1,5 +1,8 @@
interface Example.Shape {
[[A generic shape object]]
[[A generic shape object
@since 1.00
]]
methods {
area {
[[Calculate the area of the shape.]]

View File

@ -1,5 +1,8 @@
class Example.Square (Example.Rectangle) {
[[A square shape object]]
class Example.Square extends Example.Rectangle {
[[A square shape object
@since 1.00
]]
implements {
Example.Rectangle.width {set;}
Example.Rectangle.height {set;}

Some files were not shown because too many files have changed in this diff Show More