Commit Graph

63 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 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Cedric BAIL 48fb9856c0 edje: fix float comparison warning in edje text logic. 2016-12-20 16:39:30 -08:00
Youngbok Shin 835c8d1b77 Edje: remove a unreachable code from edje_text.c
Summary:
If "text" is NULL, it is set as empty string in the above code.
So, the removed line is unreachable.

Test Plan: N/A

Reviewers: raster, cedric, herdsman, woohyun, jpeg, Hermet

Reviewed By: Hermet

Differential Revision: https://phab.enlightenment.org/D4462
2016-12-08 13:31:05 +09:00
Jee-Yong Um 0fd1445508 edje.object: implement Efl.Observer interface
Summary:
To remove duplicated lines to handle edje class (color, text, size),
observer interface is implemented to Edje.Object.

Reviewers: jpeg, cedric

Reviewed By: cedric

Subscribers: bu5hm4n, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-01 11:48:44 -07:00
Carsten Haitzler 1d6a58cfc9 edje - save memory on edje parts as a lot of over-allocation was done
so ... Edje_Calc_Params was huge ... like about 200 bytes. every part
in every live edje object got one of these in addtion to real part
struct info etc. ... so really every part was probably consuming
300-500 bytes or so... crazy. so i made a lot of the data now optional
so only the minimum required is allocated now which cuts down about 110
or even 120 bytes per part, depending. 100 bytes was needed for 3d
node parts even though almsot no parts are 3d node parts... the image
and text data was 30-40 bytes so we consumed 100 even if we only used
30-40... so this cuts that done and puts in polace calc param cleanup
funcs everywhere they are needed to clean up this extra allocated data.

i also reduced this even more by maping pointers to req_drag, map and
physics and clip_to fields in another extension struct cutting
down another 28/52 bytes on most parts (in  return for an added
4/8 bytes - on 32/64bit accordingly).

in elementary_test this saves about ~300kb of ram for just having the
etst run and displaying (peak memory measuremment). so massif says
10.6M -> 10.3M.

@optimize
2016-08-15 09:21:08 +09:00
Youngbok Shin 982ef0b9d0 Edje calc: Fix Evas Text width calculation with ellipsis
Summary:
To keep consistency with Evas Textblock part in edje,
text.min has to work logically even if ellipsis is enabled.
If a Text part has minimum width, maximum width and "text.min: 1 X;",
Text part should be expanded until its width reaches to the maximum width.
Then, ellipsis will work. Singleline Textblock is also working like this.
@fix

Reviewers: cedric, herdsman, raster, tasn

Subscribers: Blackmole, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D3587
2016-07-12 10:48:17 +09:00
Vyacheslav Reutskiy fb352e17c6 edje_text: fix the fit calculation for different text size
Fixed T3569

@fix
2016-06-23 09:13:53 +03:00
Jean-Philippe Andre 7bf8da2baa 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
Mykyta Biliavskyi ce62a8efdf Edje text: fix behavior for text source and source attribute.
Check present source by index, because name of source
can be non NULL. Updates name of source part accordingly to
the current source part index.
2016-06-16 15:57:08 +03:00
Jean Guyomarc'h f55cb6649d edje: fix unused variable when gettext is disabled 2016-06-07 22:21:33 +02:00
Vyacheslav Reutskiy 3749fed463 edje_text: don't apply ellipsis if fit is setted
Test plan:

collections {
   group { name: "new";
      parts {
         part { name: "text";
            type: TEXT;
            description { state: "default" 0.0;
               text {
                  text: "Hello world";
                  size: 12;
                  fit: 1 0;
               }
            }
         }
      }
   }
}

Fixes T3519

@fix
2016-04-28 09:45:01 +03:00
Cedric BAIL fd80e26f06 evas: make no longer supported object, legacy only.
So I forgot to clean my hard drive from previously generated files,
and obviously everything still worked. This lead to having to roll back
evas_smart_clipped.eo as a public eo object until we merge elementary.

Still I would like someone to take a look at elm_pan.eo and figure out
how to not rely on smart clipped there.
2016-03-21 16:31:26 -07:00
Tom Hacohen 3faf3f3fc6 Some automatic migration and some manual adjustments to calc and text.
These file needed some manual adjustments in addition to the automatic
migration, that's why these are separate from the previous and next
commits, so I can easily know there are additional changes to these, and
it wasn't just the script.
2016-03-03 09:56:20 +00:00
Tom Hacohen 438e1db893 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
Jean-Philippe Andre 64fd278c62 Evas filters: EO-ify the filters API
This creates the new interface
 Efl.Gfx.Filter

And the implementation is a mixin (evas_filter_mixin.c):
 Evas.Filter

All the filter rendering code has now been moved to this
new file. TODO: Merge image filtering.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre a18107309d Edje: Factorise filter code for TEXT and IMAGE
TODO: eo-ify the filter API properly and stabilize it.
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 707b979ffd Edje/evas filters: Use EDJ data sections to store filters code
Use the file data {item, file} block to embed filters code.
It can become especially useful to keep the filters as separated
Lua files, that will be embedded in the final edj file.

@feature
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre d00378edcf Edje/evas filters: Add filter.source support
This should preserve ABI stability with earlier versions of
edje_cc while still providing more advanced control over
proxy bindings for evas filters from EDC.

Also fix proxy binding for filters.

@feature
2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 0e11e0a6dc Edje/evas filters: Quick renaming of evas filters related stuff 2015-06-25 14:36:09 +09:00
Jean-Philippe Andre 225c0f937a Evas filters: Pass edje state name & value to the filters
From Edje, pass the current state info (name and value) as well
as the next state and the transition position when applicable.
2015-06-25 14:36:08 +09:00
Jean-Philippe Andre 0a2362fa69 Edje: Fix indentation after a clean-up commit
@zmike apparently wanted to beat the b0rker in chief,
(see 172a0ccf0c) but edje_text.c came out worse than before :)

eo_do() seems to totally mess with editors' auto-formatting in
some cases.
2015-06-09 16:20:03 +09:00
Mike Blumenkrantz 172a0ccf0c edje: reformat all C files
this has been unreadable for years due to the french tabber.
2015-06-08 14:43:00 -04:00
katpavalli ff1184df2e 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
katpavalli dca95fb45a 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 651436f410 efl: rename visibility to visible.
After discussion bindings and people in general prefer visible.

T2035
2015-04-03 16:23:19 +02:00
Cedric BAIL c08f8e26a6 efl: add Efl.Gfx.Base and fix inheritance for Evas_Object. 2015-04-03 16:23:17 +02:00
Bryce Harrington 27920d31c1 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
Sohyun Kim 78ddad3daf edje: Add edje to text_class_member_hash properly.
Summary:
When textblock styles have text_classes, all edjes in the files were added
to text_class_member_hash even if the edjes didn't use the textblock styles. It
makes time long to update text_class.
This will add the edje using the textblock style which has a text_class to
text_class_member_hash.

Reviewers: cedric, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2035
2015-02-24 18:26:18 +01:00
Tom Hacohen fe374084ed Efl interfaces: Add text interface and start using it. 2014-08-21 11:02:11 +01:00
Tom Hacohen ceada9523f Efl interfaces: Drop interface namespace from the used interfaces.
We don't need this namespace, it just makes the names long and complicated.
2014-08-21 11:02:11 +01:00
Tom Hacohen bf55348a92 Efl interfaces: Start using the text_properties interface. 2014-08-21 11:02:11 +01:00
zmike 0ece308bb1 edje text should actually call ellipsis functions instead of attempting to call -1(obj) 2014-08-14 14:19:04 -04:00
Carsten Haitzler 0823a2159f edje - and make logic right for no elipsis with min.x too 2014-08-15 01:36:14 +09:00
Carsten Haitzler 0a457c3f8b elipsis fix - use -1 not 0 to turn off - unusual value for off 2014-08-15 01:26:38 +09:00
Carsten Haitzler 47f22cc997 edje - fix elipsis complaints/bugs with "old" themes
this fixes the elipsis changes xmike made by assuming elipsis of 0
whenn text min x is set (which is what we want anyway). this is a
complaint that is all through phab and other places where people
complain about "x..." or something now replacing formerly perfectly
find labels
2014-08-15 00:45:14 +09:00
Jaehwan Kim 7e5d2606cc edje: Add dpi feature.
Summary:
This dpi is used to get the scale for each collection.
If each collection has a described dpi, it calculates a proper scale
based on the dpi and dpi which is described in the collection.

@feature

Test Plan:
If add dpi to collection of edc, the edje will save the value as the dpi of the collection.
For example, if the dpi of your device is 100, you just set dpi: 100 in the collection of edc.
If the edj is loaded in another device(dpi is 200), it will scaled 2 times.
It is possible that the described dpi of application and theme are different.
In that case, application and theme have a different scale.
It makes the edj that made in different environment works in one device.

Reviewers: seoz, zmike, JackDanielZ, Hermet, woohyun, cedric, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1190
2014-07-24 14:50:25 +09:00
Cedric BAIL b95165201c edje: factorize call to eo_do to reduce eo_do_start cost. 2014-07-07 13:44:11 +02:00
Daniel Kolesa 43e2349203 eolian/generator: public api func name deduplication, spank tasn if it breaks 2014-06-20 17:09:03 +01:00
Jean-Philippe Andre 855c196ae8 edje_text: Remove no-op pad_get
This call to pad_get is useless.
2014-05-14 14:44:47 +09:00
Mike Blumenkrantz 894c36ff11 de-elipsis edje
the word is "ellipsis". it's bad enough that we have released misspelled api, but we can at least spell things correctly internally.
2014-05-13 16:20:41 -04:00
Mike Blumenkrantz e6f0deca27 edje should only apply "calculated" text size if that size exists
fixes text.source sizing when size is not specified in child part
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 5f376fde36 edje now correctly supports text.source and text.text_source for swallowed parts
fix T1186
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 7355f67c1f revert edje ellipsis doc changes
if we're reverting functional changes, then it's probably a good idea to revert the accompanying documentation
2014-04-23 09:28:23 -04:00
Mike Blumenkrantz adcc323291 edje: the ellipsis fuckup preservation commit.
what a huge, colossal cock-up of a clusterfuck. it's a good thing nobody ever uses ellipses or edje. otherwise we'd probably get complaints about this kind of thing.
2014-04-22 20:21:46 -04:00
Mike Blumenkrantz c2ced46d2d edje now correctly forces ellipsis setting on text parts
this should always be applied, not just when min_x isn't set; failure to do so causes erroneous ellipsizing in some cases where it should be explicitly prohibited

@fix
2014-04-22 19:18:45 -04:00
Cedric BAIL 2b84495168 edje: check font change in edje text part cache infra.
@fix
2014-03-17 19:10:22 +09:00
Jean-Philippe Andre a25b212bac Evas filters: Add support for proxies in Edje
They will be defined with the following syntax:
buffer:buf(src=part);
2014-02-07 17:33:18 +09:00