Commit Graph

100 Commits

Author SHA1 Message Date
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Cedric BAIL 2623367732 * edje: fix some memleak issue.
SVN revision: 51033
2010-08-12 12:58:54 +00:00
Iván Briano b8b8381576 No need for path in font_directory, and use the right key to store/find them
SVN revision: 50999
2010-08-11 14:24:03 +00:00
Cedric BAIL 9ecc1354c6 * edje: new file format.
WARNING ! WARNING ! WARNING ! WARNING !
	Old file format is not readable by edje directly. If you have old edje
	file that you want to convert, use edje_convert. Their is no way back.

	Recompile your file as soon as possible. Please report any issue you
	spot as this is a huge and needed change.



SVN revision: 50936
2010-08-09 17:34:03 +00:00
Lucas De Marchi 0a4617ae38 FORMATTING
* Remove vim modelines:
 find . -name '*.[chx]' -exec sed -i '/\/\*$/ {N;N;/ \* vim:ts/d}' \{\} \;
 find . -name '*.[chx]' -exec sed -i '/\/[\*\/] *vim:/d' \{\} \;

* Remove leading blank lines:
 find . -name '*.[cxh]' -exec sed -i '/./,$!d'

If you use vim, use this in your .vimrc:
set ts=8 sw=3 sts=8 expandtab cino=>5n-3f0^-2{2(0W1st0



SVN revision: 50816
2010-08-04 16:57:32 +00:00
Mike Blumenkrantz f33f0139a6 move a couple variables into loops, reformat slightly to make obvious a redundant variable set
SVN revision: 50703
2010-07-31 05:00:42 +00:00
Cedric BAIL e773bc9246 * edje: change memory layout that will become the new file format.
NOTE: I tried this change with all the apps and theme I had, but maybe
	i missed some bug. Please report any strange behaviour.


SVN revision: 50641
2010-07-29 12:02:36 +00:00
Cedric BAIL a6b33190b0 * edje: fix fit code when string is empty.
SVN revision: 50537
2010-07-27 10:06:02 +00:00
Cedric BAIL e17a4089df * edje: This is the first commit of a rewrite of edje file
internal representation.

	The objectiv is to simplify code, consume less CPU and memory
	without loosing feature. Please report any breakage when you
	see them. It will take a few weeks before we change the file
	layout, during that time the load time may increase.


SVN revision: 49922
2010-06-28 13:56:30 +00:00
Cedric BAIL 73ac5cdc95 * edje: remove warning due to API change in Ecore.
SVN revision: 49830
2010-06-24 16:16:50 +00:00
Cedric BAIL b32c9a3eae * edje: Add Fixed Point Math support to Edje.
You can try it by passing --enable-fixed-point to the configure. It
	will produce an ABI/API compatible Edje library that use internally
	Eina_F32p32 instead of double. It will load Eina_F32p32 instead of
	double from eet file (thanks to eet ability to convert them on the
	fly), so edje file are compatible between fixed point and floating
	point version.

	This patch touch almost all internal calc of Edje, I did test it with
	elementary_test, enlightenment and all my test apps, but it could
	certainly break some of your preferred Edje file. If you see any
	unexpected behaviour please report them to me as soon as possible.

	Note: For devs, I put few macros in edje_private.h that should now
	be used when doing calc in Edje, please use them so that Fixed Point
	doesn't break in the futur.


SVN revision: 44323
2009-12-09 15:44:54 +00:00
Carsten Haitzler 84077e2f18 patch from tasn: rtl fit.
SVN revision: 43886
2009-11-22 01:49:44 +00:00
Cedric BAIL 8ea901a753 * edje: Remove some potential bug detected by llvm and gcc.
See: http://local.profusion.mobi:8081/~lfelipe/output-efl/


SVN revision: 42930
2009-10-07 10:55:48 +00:00
Cedric BAIL eff22017dc * edje_calc: Cleanup calc structure.
SVN revision: 41744
2009-08-13 16:13:49 +00:00
Cedric BAIL 9807d2e4c8 * edje: More cleanup of Edje_Real_Part.
SVN revision: 41683
2009-08-11 10:32:21 +00:00
Cedric BAIL 922939d832 * edje: Some cleanup, mainly removing dead code.
SVN revision: 41679
2009-08-11 09:45:06 +00:00
Cedric BAIL 854f360739 * edje: Reduce sizeof (Edje_Calc_Params).
Note: It doesn't really impact edje memory foot print yet. But in
	the plan to do a computation cache inside edje, this structure
	will be used a lot (I am planning to do this feature at some point,
	but no ETA yet, and be reassured it will be optionnal so we can
	choose between CPU load or memory load).

	Note: As I was looking for similar area of improvements,
	Edje_Part_Description could really use an union to reduce it's size,
	but as we load this structure directly from an Eet file, we need
	union in Eet first. And this should be part of a comming Edje file
	format break.



SVN revision: 41652
2009-08-10 09:56:19 +00:00
Carsten Haitzler c3b8b4ee14 revertg big R to L patches because they break cursors and selection.... BACK
boy BACK!



SVN revision: 40783
2009-05-22 21:12:32 +00:00
Carsten Haitzler e999c88e80 tasn's rtl pathes and improvements... continued!
SVN revision: 40715
2009-05-18 06:08:15 +00:00
Gustavo Sverzut Barbieri 2e809f845f Interpolate text font size.
Often requested for animations that want to grow or shrink text
quickly. This is a faster alternative to using geometry with rel1/rel2
and "text.fit: 1 1;" since it does not need to figure out which size
fits better into that object.

I tested and it does not seem to introduce any regression. Also
checked with scale and text_class variations.



SVN revision: 38958
2009-02-05 18:15:34 +00:00
Carsten Haitzler b6f51da478 allow individual objects to have differing scaling factors (object scale
overrides edje global scale)



SVN revision: 38908
2009-02-03 05:07:58 +00:00
Cedric BAIL e33474c92f Move to eina_hash. Nothing should break, but if you experience any unexpected behaviour
please ping me on #edevelop.



SVN revision: 38183
2008-12-17 14:26:47 +00:00
Gustavo Sverzut Barbieri 2f8f874b20 Shut up a bunch of warnings and fix some real errors.
SVN revision: 37954
2008-12-06 03:08:17 +00:00
Vincent Torri 0d8b00fdeb * move standard header files to source files
* remove gendoc


SVN revision: 37158
2008-10-26 17:18:19 +00:00
Cedric BAIL fa66dbf40a Remove Evas list from Edje and use Eina instead.
SVN revision: 36961
2008-10-22 11:34:42 +00:00
Cedric BAIL b489e1936b Switch evas_stringshare to eina_stringshare.
SVN revision: 36672
2008-10-15 14:11:11 +00:00
Carsten Haitzler 8aed008df3 fix a jitter with text fit if fit region tiny!
SVN revision: 36389
2008-10-02 04:01:54 +00:00
Carsten Haitzler 23e2c9e035 support an edje scaling factor. parts can selectively say "yes.. scale me!"
:)... this allows e etc. to adapt to massivelyt different dpi screens with
slickness that even svg can't get to... why? you scale just what NEEDS
scaling (text, button sizes, and other limiting elements). other bits like
borders, padding etc. can remain pixel-perfect and thus the look is amazing.
pixel-perfect drawing with scalable adapting.



SVN revision: 35895
2008-09-09 14:13:34 +00:00
doursse c5623c01b3 reorganize header files inclusion. Fix some problems when compiling on Windows
SVN revision: 34768
2008-06-07 10:06:14 +00:00
Carsten Haitzler 4d54b4aaa6 adriano';s edje text fit patch
SVN revision: 34206
2008-04-06 02:08:21 +00:00
doursse 8e386e3f73 remove trailing spaces
SVN revision: 34101
2008-03-24 08:22:01 +00:00
Gustavo Sverzut Barbieri 08bfdacdee Bugfix and refactor get of font based on text_class.
Edje tries to copy original style to font provided by text_class if
this have no style.

However code was supposing that text_class font always had more than
one occurrence, these separated with ',' and did not check if this is
not the case, so "e = strchr(',', tok);" was returning NULL and all
the math were using negative values.

The fix now does the proper checking, avoid one useless alloca() and
the respective copy, also doing the copies with memcpy() since sizes
are already known.

Refactory was done to make code simpler and also avoid having it
copied 3 times.


SVN revision: 33869
2008-02-29 21:43:55 +00:00
Gustavo Sverzut Barbieri b542743d9e Fix calculation of font size when text.fit_y is set.
Before it was using a linear search with initial step proportional to
difference bettwen desired and current height, but the way it was
implemented it was giving incorrect values, for example: a text in
an animation that enlarges height was getting size_{n} < size_{n-1},
where it should be always the oposite (the sequence was like: 31, 32,
33, 34, 31, 33, 34, 35, ...).
   One way to avoid that was to recalculate "dif" based on new "th",
but it quickly drop to 1.

The current implementation now uses a binary search to find the first
size that matches the desired height and then a linear search to
search the largest font doing that (differents sizes may result in the
same height). This linear search is often an extra lookup and can be
avoided if we want just something that fits (instead of the largest).


SVN revision: 32146
2007-10-22 22:31:13 +00:00
Carsten Haitzler 412d44f90f bizarre - text sources were broken - but never appeared in e - somehow they
worked. fixed.


SVN revision: 32078
2007-10-14 23:54:27 +00:00
Carsten Haitzler 7a889364ad retain text styles fron theme if they are specificed
SVN revision: 31744
2007-09-17 05:07:35 +00:00
doursse 974152be16 remove trailingspaces
SVN revision: 31657
2007-09-08 18:31:56 +00:00
Peter Wehrfritz 256b9de930 add support for glow, far shadow and far soft shadow for text parts
SVN revision: 30629
2007-07-06 23:33:42 +00:00
Sebastian Dransfeld 0f319df781 Remove mysterious charachter.
SVN revision: 30393
2007-06-18 16:49:11 +00:00
Sebastian Dransfeld 63b22447ef Remove padding when searching for character position.
SVN revision: 30392
2007-06-18 16:48:43 +00:00
rephorm e954849ee1 Remove part list, using table everywhere instead
SVN revision: 30085
2007-05-26 23:57:21 +00:00
Stafford Mitchell Horne 61bda22a70 Add negative font size handling in text_classes
* negative size is a multiplier for the origianl size
 i.e. : -100 = 1.0x;  -120 = 1.2x


SVN revision: 29835
2007-05-03 23:15:09 +00:00
Carsten Haitzler a9daf7dd89 cedric's patches.
SVN revision: 29353
2007-04-04 13:25:55 +00:00
Carsten Haitzler 6d5551939d tilman's edje font metrics patch
SVN revision: 29266
2007-03-30 23:39:41 +00:00
Carsten Haitzler 8c93e825a8 same as previous commit.
SVN revision: 26236
2006-09-30 10:18:37 +00:00
Carsten Haitzler 2f82204b7b revert cedrics patch for font stuff - it breaks textblocks
SVN revision: 23681
2006-07-03 06:15:05 +00:00
Carsten Haitzler 334eb3a389 cedrics font hash lookup speedup :)
SVN revision: 23644
2006-07-02 06:18:18 +00:00
Carsten Haitzler 5a3be0fd8c zigs patch for edje adding more embryo script power to set state vals
SVN revision: 23616
2006-06-28 18:31:56 +00:00
Stafford Mitchell Horne 39c1195176 Add ability for text blocks to use text classes
* Classes are defined at the tag level
 * Tags whithout classes inherit the parent class
 * text class defined by putting text_class=<class name> in tag style


SVN revision: 21518
2006-03-28 07:45:54 +00:00
stffrdhrn 46a61a67b7 Edje bug fixes:
* Add some comments
 * Fixup some const char */stringshare related compile warnings
 * Fix text classes


SVN revision: 21392
2006-03-19 04:22:35 +00:00
rephorm 803562a836 don't free color class stuff in text_on_del, it gets done in color_class_on_del...
also, it seems as though default descriptions at least are shared between objects of the same group, so when this set the color_class to NULL, all other objects lost their colors.


SVN revision: 20098
2006-01-29 16:50:30 +00:00