Commit Graph

33 Commits

Author SHA1 Message Date
Amitesh Singh 7144f278f5 efl.gfx: move scale{} from efl.ui.base to efl.gfx 2017-12-04 14:19:29 +09:00
Jean-Philippe Andre 8803040484 evas: Implement scale API in proper EO fashion
This removes the internal function pointer for scale_update. This makes
all relevant classes implement the scale API in EO.

This removes the duplicate function in Efl.Canvas.Object and only uses
the one from Efl.Ui.Base interface.

This *seems* to be working as expected. Fingers crossed!

PS: I don't like the name Efl.Ui.Base. It's an interface for a few
common API's between Gfx, Canvas and UI levels... Maybe scale simply
doesn't belong there.
2017-11-30 10:48:24 +09:00
Jean-Philippe Andre 824792f09d elm: Major cleanup of EO files
This prevents legacy EO classes from being exposed through .eo.h headers
or .eo in share/eolian/includes. Also removes a slew of useless xxx_eo.h
intermediate headers.

Notes:
 - elm_systray has no proper API: it's not clear if the EO API should be
   released (in which case it needs to be renamed to efl_something) and
   there is no legacy API to create a systray object.
 - Some files have been placed in a "FIXME" section, as I believe they
   are necessary within EO land, but at the same time still don't
   conform to the interfaces (eg. name starts with elm_).
 - elm_interface_scrollable is required by photocam. This means photocam
   needs to be adapted to fit the EO scroller API (still to be
   completed, I believe).

Bugs:
 - This breaks most C++ examples. I KNOW. And I'm working on it.

Ref T5301
2017-11-01 21:23:31 +09:00
Jean-Philippe Andre 3bff7363b5 efl: Use Eina.Size2D for size hint min 2017-09-18 14:42:52 +09:00
Jean-Philippe Andre d24dcb3c24 efl: Use Eina.Size2D for size hint max 2017-09-18 14:20:03 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Amitesh Singh ef1c178a28 Revert "elm: rename elm spinner to Efl.Ui.Spinner"
This reverts commit 9836116cab.

This is based on discussion today i had.
There would be a separate minimal spinner class instead
which facilates ways to extend it.
2017-09-07 11:18:08 +09:00
Amitesh Singh 9836116cab elm: rename elm spinner to Efl.Ui.Spinner
Ref T5900
2017-09-01 14:08:21 +09:00
Jean-Philippe Andre 87aa053e58 elm_test: Remove calls to fill+expand (EO)
Wherever the EO API is used, i.e. efl_add() is used to create evas
objects, we can skip the calls to set fill/expand.

This new set of defaults indeed saves ~60 loc in the tests (out of 115
objects created). I found only 3 cases where the align had to be set
manually (to the old default of 0.5).

See 1a1b8bc451
And e8b7f5f255

Ref T5301
2017-08-23 15:57:49 +09:00
Jean-Philippe Andre d28510a37b test: Fix EO API usage (direction) 2017-08-23 15:24:37 +09:00
Jean-Philippe Andre b1488b98de efl.ui.box: Switch to Efl.Ui.Dir (EO)
This makes the default box vertical, just like in legacy.
The flow box is horizontal by default.

Ref T5870
2017-08-10 14:42:08 +09:00
Amitesh Singh 40945d9859 elm: rename elm panes to Efl.Ui.Panes 2017-08-07 15:49:11 +09:00
Jean-Philippe Andre 83a4c3e3e2 elm_test: Remove calls to visible_set for EO objects 2017-08-04 10:24:03 +09:00
Daniel Hirt 616a60f041 Efl text: shorten naming of methods
eo_prefix are set to "efl_text".
Also, "Efl.Text.Format" is shortened to now include the "_format"
prefix.
"Efl.Text.Font" keeps the "_font" prefix, for better readability.
2017-06-12 00:32:34 +03:00
Daniel Hirt bf66daf657 Gfx filters: set multiline to Ui.Text widget
By default, multiline is disabled, so needs to enable this.
2017-06-12 00:10:05 +03:00
Daniel Hirt 3edf4985a4 gfx_filter: add efl_style_gfx_filter
Also, rename the format string to 'gfx_filterstr' to match the other
strings.

Update the filter test to use this property.
2017-06-12 00:10:05 +03:00
Amitesh Singh 850498e977 rename elm_button to Efl.Ui.Button
ref T5323

Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
2017-05-22 17:28:47 +09:00
Jean-Philippe Andre 093938e5d9 win: Remove special class Efl.Ui.Win.Standard
All windows should be standard, really. Except when using legacy
elm_win_add() or if type_set() was called with a specific type.

I dislike type_set...

Ref T5322
2017-05-17 10:39:43 +09:00
Jean-Philippe Andre 9aa335cecc evas filters: Remove warning about OpenGL
Well... I'm working on making all this work, so the log
is a bit irrelevant now.
2017-04-14 11:26:44 +09:00
Jean-Philippe Andre 5bce7120f1 evas filter: Implement blur filter in pure GL
Wait a second though, this implementation is not only incomplete
(no support for box vs. gaussian blur), it's also insanely bad in
terms of performance. Small radii may work fine, but at least blurs
render properly in GL with this patch (no more glReadPixels!).

The shader needs a lot of love, including in particular:
- support for 1D box blur single pass
- support for 1D gaussian (or sine) blur
- use linear interpolation and N-tap filters
- separation of 2D blur in two passes (high-level logic)
- potentially separation of large 1D blurs in 2 or more passes
  knowing that 2sigma == sigma + sigma when it comes to the gaussian
  bell curve.
2017-04-14 11:26:43 +09:00
Jean-Philippe Andre 2ef8d6f39a evas filters: Refactor ector and gfx filters A LOT
Alright, so this is a massive patch that is the result of
trying to get rid of unused or poorly implemented classes in
ector. Originally ector was meant to support VG but extend to
things like filters as well. At the moment, ector's design
makes it quite hard to plug in the filters.

For now I think it's easier to implement the GL support for
the filters directly in the engine, where I hope to interfere
as little as possible.

This massive patch keeps only the required minimum to support
a versatile gl buffer that can be mapped, drawn or rendered to (FBO).
It's extremely inefficient as it relies on glReadPixels and lots
of texture uploads, as well as conversions between ARGB and Alpha.

Another type of GL buffer is a wrap around an existing GL image,
but that one is read-only (map or draw: no write map, no FBO).

No, all the filters run fine, and the high-level implementation
(evas_filters.c) does not need to know whether the underlying engine
is SW or GL. One problem though appears with the blending or blurring
of some Alpha buffers, the colors are wrong.

This patch removes more lines than it adds so it must be good ;)
2017-04-14 11:26:43 +09:00
Chris Michael d975597fb4 elementary_test: Remove set but unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-01-23 09:35:33 -05:00
Jean-Philippe Andre caf3b95a6d elm_test: Make the animated filter a bit prettier
This is a basic example of fire text.

The gif was generated with a GIMP script from
http://fence-post.deviantart.com/art/GIMP-Animated-Fire-Script-84921148
2017-01-17 14:35:31 +09:00
Jean-Philippe Andre 277ca9c0fc elm_test: Add a filter to the code entry
Just because I can. It's the filter code editor after all, deserves
a filter of its own. Plus, it tests that we can embed a filter
in the default style, and edit text with a filter and everything
works as expected. Yay!
2017-01-17 14:35:30 +09:00
Jean-Philippe Andre 13c62c10e1 evas: Introduce event style_insets,changed for tb
This will be triggered in the rare case when a textblock's
insets are changed (ie. the padding due to filters or style).

This fixes invalid sizing in the test case in elm (due to a
lack of event after program_set).

@feature
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 93965db815 evas: Implement filter sources support for textblock 2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 1512741b48 evas: Implement filter_data_set for textblock
This is a function that allows passing variables from C or EDC
to the filter's Lua code. Useful in particular for color classes
from EDC.

This data would be the global data but we could eventually add
a markup tag to specify a data value per filter instance. For now
a single data value per tb object should be more than enough though.
2017-01-17 14:35:29 +09:00
Jean-Philippe Andre 4453044d84 elm_test: Improve gfx filter test case for tb & text
Now we can test both of those widgets with filters. We
could also add an image. This test case still needs some
improvement anyway.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre 421df2eec6 evas: Adjust tb padding from gfx filters padding
This makes gfx filters padding work just like the standard style
padding, which means the tb user must offset the object position
by -l, -t and increase the object size by l+r,t+b.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre 5f1c993d17 evas: Set gfx filters by name on textblock
This allows for much simpler markup, and easier tracking of
which filters are in use, etc... Next: data and sources.
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre cb294320dc evas: Experimental textblock support for gfx filters
This is only for testing purposes for now. Eventually we need
to fix the following things:
- terrible performance (cache buffers)
- force redraws based on filter padding
- expand textblock padding based on max filter padding
- add sources, data and a filter name/code hash
- test! :)
2017-01-17 14:35:28 +09:00
Jean-Philippe Andre bcfc33fd00 elm_test: Add a test case for gfx filters
This adds a test window for the efl_gfx_filter (also known as
evas filters). The builtin examples are not incredibly pretty
but they showcase some of the most basic features. They also
show that some of the filters need to be improved.

Note that the code contains a lot of FIXME due to the incompleteness
of our EO API. Also, Efl.Ui.Text still has quite a few issues (sizing,
lack of a working change event, ...) so the UI doesn't even look as
designed (a label is missing). Hopefully this should get fixed over
time.

Oh and this is mostly using EO APIs but that's a terrible idea as
evas_object_text is not going to be exposed in EO land... except
it's the only object implementing filter support (with image).
2016-12-13 16:12:27 +09:00
Jean-Philippe Andre fdcd926960 evas: Fix stacked box align
I added a way to respect the object's alignment when adding them
to a stacked box, but that alignment should only be used when the
box align is set to fill, otherwise both aligns would conflict.

See 3df7b717c9
2016-12-13 16:12:27 +09:00