Commit Graph

210 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
Carsten Haitzler 480666910a re-enable. valgrind happy now. hrrrm.
/    /
(o)  (o)
   ..
 
  ~-~\.



SVN revision: 51110
2010-08-14 10:28:57 +00:00
Carsten Haitzler 966810eedb ceeeeeeeeeeeeeeeeedric! :)
SVN revision: 51108
2010-08-14 04:03:33 +00:00
Cedric BAIL c1436aac91 * edje: fix memory leak.
SVN revision: 51046
2010-08-12 15:05:56 +00:00
Cedric BAIL 2623367732 * edje: fix some memleak issue.
SVN revision: 51033
2010-08-12 12:58:54 +00:00
Cedric BAIL 7d69e96bfe * edje: use mempool for Edje_Part and Edje_Part_Description_*.
SVN revision: 50944
2010-08-09 21:08:08 +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
Tiago Rezende Campos Falcao a5f73d85c0 Decrement description counters in edje_collection_free_part_description_free
SVN revision: 50868
2010-08-06 19:16:43 +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
Cedric BAIL c94ae93096 * edje: split programs type in different stack for later speed improvements.
SVN revision: 50810
2010-08-04 14:25:40 +00:00
Cedric BAIL 74f7480e41 * edje: fix some issue during destruction of edje_part_description,
and move tweens to an array.


SVN revision: 50765
2010-08-03 12:58:31 +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 793c66b5dc * edje: last move of properties in the right structure.
SVN revision: 50284
2010-07-16 16:00:26 +00:00
Cedric BAIL 83bb52f7c9 * edje: attempt to reduce code size by using more macro.
SVN revision: 50281
2010-07-16 13:58:35 +00:00
Cedric BAIL 30d35eb1ba * edje: start to split structure content.
SVN revision: 50279
2010-07-16 11:37:58 +00:00
Cedric BAIL b49c2411bd * edje: when gradient meet dodo. Yes, they are gone !
SVN revision: 50223
2010-07-13 15:47:19 +00:00
Cedric BAIL c2b8feda9e * Edje: deprecate Gradient part by displaying an error message
on edje file load.

	WARNING: THIS CODE WILL BE GONE IF NO ONE IS WILLING TO TAKE
	MAINTAINER SHIP OF IT.


SVN revision: 49946
2010-06-30 09:49:15 +00:00
Cedric BAIL 4e30cb2411 * edje: move structure from Eina_List to array now that Eet support
them.


SVN revision: 49936
2010-06-29 13:48:03 +00:00
Cedric BAIL 5da985c981 * edje: add an cache for group exist test.
SVN revision: 49928
2010-06-28 17:18:47 +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
Fabiano Fidêncio 40563f8aef From: Fabiano Fidêncio <fidencio@profusion.mobi>
Changing return of Eina_Bool functions that were not EINA_TRUE or
EINA_FALSE in Edje.



SVN revision: 49469
2010-06-05 13:07:08 +00:00
Carsten Haitzler 2049cf563c leake! fix!
SVN revision: 49445
2010-06-04 06:45:46 +00:00
Cedric BAIL 83e505b5c6 * edje: Add image set support.
Ease support of Freedesktop multiple size image.

	Sample:
	-------

	images {
		..
	       	set {
			name: "image_name_used";
  			image {
				image: "500x500.png" LOSSY 90;
     				size: 201 201 500 500;
  			}
  			image {
				image: "200x200.png" COMP;
     				size: 51 51 200 200;
  			}
  			image {
				image: "50x50.png" COMP;
     				size: 11 11 50 50;
  			}
  			image {
				image: "10x10.png" COMP;
     				size: 0 0 10 10;
  			}
		}
		..
	}



SVN revision: 49369
2010-06-01 13:31:07 +00:00
Tiago Rezende Campos Falcao a3333361f5 Dont need recalc params in external description in part_recalc.
Others types, like TEXT/TEXTBLOCK/SWALLOW/GROUP (others?), are similar to Externals. And may can recalc some properties only in description_apply, not on every call to part_recalc.

Some generic boolean properties, like "visible", can be moved to description_appy too.

SVN revision: 48144
2010-04-19 20:37:35 +00:00
Iván Briano 3c61844af1 Make the Edje Smart inheritable.
Pretty much moving some things around and extending the smart class
to allow overloading some common functions. Edje_Edit will make use
of this.


SVN revision: 47841
2010-04-08 19:21:54 +00:00
Carsten Haitzler 12012ef38a ok tested - it. new lua disabled for now (not ready). old lua still there.
SVN revision: 47783
2010-04-06 11:32:09 +00:00
Carsten Haitzler 8babebf48e an ongoing lua cleanup. existing lua is there and works for the most part.
but it could be much much much cleaner/better so i started a minimalist redo.
it's temporarily enabled right now. will disable soon to do in the background.



SVN revision: 47782
2010-04-06 11:26:32 +00:00
Carsten Haitzler 77a55c3fd8 aaah well... 1. fix segv with edje_match stuff is deep child cleans up
pattersn - ref them.
2. edje lua... beating it into shape. slowly bit by bit.



SVN revision: 47685
2010-04-02 11:05:53 +00:00
Gustavo Sverzut Barbieri cfecbc912b Edje EXTERNAL API break, for good.
I'm now introducing a couple of goodies to make externals more useful,
they are:

 * add: extra parameter with the part name. This may be used by
   external objects to emit signals in the name of that part.

 * param_set/param_get: set parameters at runtime, given their names
   and types. This avoids requiring users to get the actual object and
   call methods. This abstraction is also good because it let one uses
   Elementary without even linking to it ;-) (this have limits, like
   complex types are not supported).  Right now this is just exposed
   to C, but goal is to have it exposed in Embryo and Lua as well.

 * translate: new method to translate previously strings that are
   specified statically, such as the parameters names.


Four new functions got added to the Edje API:

 * edje_object_part_external_object_get() so we don't have to abuse
   edje_object_part_swallow_get()

 * edje_object_part_external_param_set() and
   edje_object_part_external_param_get() that call the external type's
   functions.

 * edje_external_param_type_str() to convert types to string and
   provide nicer debugs :-)


TODO:
  * expose external_param_set()/external_param_get() to Embryo and Lua.




SVN revision: 47456
2010-03-25 18:05:42 +00:00
Cedric BAIL ae586e291e * edje: Only register callback once for external.
SVN revision: 46868
2010-03-04 14:44:20 +00:00
Gustavo Sverzut Barbieri fcb71a4b3b Edje now uses Eina_Bool where it should.
SVN revision: 46646
2010-02-28 15:57:17 +00:00
Cedric BAIL 51de26862a * edje: Add more focus event in edje. A start for a focus layout work.
SVN revision: 46389
2010-02-23 13:39:19 +00:00
Cedric BAIL e4ee012951 * edje: Change filter_state to filter and give the possibility to
filter from another part than the event source.



SVN revision: 46316
2010-02-19 18:30:46 +00:00
Gustavo Sverzut Barbieri 1ad4337878 proper shutdown of entries.
* must disconnect connected callbacks, particularly those to
   canvas. The object we previously connect will die anyway, but
   canvas continues alive, dispatching its
   EVAS_CALLBACK_CANVAS_FOCUS_IN and EVAS_CALLBACK_CANVAS_FOCUS_OUT,
   causing nasty segmentation faults!

 * must call _edje_clean_objects() *AFTER* the entry is shut
   down. Otherwise ed->evas will be NULL and
   evas_event_callback_del_full() will fail. I left extra checks on
   those, since this call will return the given data (in our case
   "ed") and NULL when callback connection was not found.

 * flag existence of entries and if they were already initalized and
   shutdown before, avoid redoing such work.

This fixes a stupid crash that bugged editje for a while now.



SVN revision: 46263
2010-02-17 23:43:31 +00:00
Carsten Haitzler 04ca0cb31e fix freeze/thaw to use less ... cpu.
SVN revision: 46181
2010-02-15 06:40:58 +00:00
Cedric BAIL 397b718cf1 * edje: Add filter_state to program.
Patch from "Tristan <blunderer@gmail.com>".


SVN revision: 46048
2010-02-10 15:07:17 +00:00
Gustavo Lima Chaves 2cca9e9b62 Fixing program addition on edje_edit: data was missing for the globs.
On regressions, please contact me.



SVN revision: 45340
2010-01-19 20:14:14 +00:00
Iván Briano ad2988b7fd Bunch of functions changed to return Eina_Bool.
More of this can be done, and some may even be too much, but I'm losing
perspective over it and either I'm inclined to move all of them or none
at all.
Reviews, comment, fixes and reverts are welcome.



SVN revision: 45115
2010-01-14 18:07:24 +00:00
Cedric BAIL 018a9dad66 * edje: Use Eina_Log.
Patch from Mathieu Taillefumier.


SVN revision: 44655
2009-12-22 13:46:00 +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
Iván Briano 521c89df41 dont segv if theres no file
SVN revision: 43958
2009-11-24 21:08:52 +00:00
Iván Briano 9892926bdf Autoload modules for external widgets
Patch by Fabiano Fidencio


SVN revision: 43951
2009-11-24 17:55:11 +00:00
Carsten Haitzler 3b07a3d255 fix segv on obj del - didnt remove callbacks!
SVN revision: 43596
2009-11-09 23:47:42 +00:00
Iván Briano 2ba79e04af Some more stuff in externals, little api change there, may change some more later.
SVN revision: 43379
2009-10-31 18:07:08 +00:00
Iván Briano 22952844c4 and bring external back now that the file was added
SVN revision: 43306
2009-10-27 01:08:19 +00:00
Carsten Haitzler d3fd0c30cb REVERT! broke edje.
try again and dont forget to add edje_external.c! (and any others needing
adding)



SVN revision: 43304
2009-10-27 00:27:50 +00:00
Iván Briano 68756f92b2 External objects support by Brian 'rephorm' Mattern
Since we are on a freeze, the patch goes on updated to current svn, but without changing its API. After the freeze some things will be added, and some will change :)


SVN revision: 43302
2009-10-26 21:33:56 +00:00
Vincent Torri cbcf159c27 warning--
SVN revision: 43266
2009-10-25 12:17:05 +00:00
Hannes Janetzek e7d76f6392 also remove text class members on object deletion
SVN revision: 42397
2009-09-11 00:48:57 +00:00
Vincent Torri 8b2bd0c079 * remove unused parameters (except in edje_lua.c, as i don't know the current status)
* remove unused variables


SVN revision: 41957
2009-08-24 16:40:42 +00:00