summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-06-01 10:30:22 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-06-01 10:30:22 +0200
commit090d38ec3cfff930366327fe7460aecb00ffaa02 (patch)
tree5a8f1c73fe13e9d65e9f8ccb9cc645f625165011 /src/lib
parent7f4ca37aaae8229bbf0deae35d35b24f96b16e78 (diff)
downloadedoors-090d38ec3cfff930366327fe7460aecb00ffaa02.zip
edoors-090d38ec3cfff930366327fe7460aecb00ffaa02.tar.gz
add eiotas_particle_has_dst with tests
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eiotas_particle.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c
index 74e1d23..ea00b5c 100644
--- a/src/lib/eiotas_particle.c
+++ b/src/lib/eiotas_particle.c
@@ -33,6 +33,7 @@ Eiotas_Particle* eiotas_particle_alloc()
particle->merged = NULL;
particle->link_fields = eina_array_new(EIOTAS_PARTICLE_ARRAY_STEP);
particle->link_value = NULL;
+ particle->cur_dst = 0;
return particle;
}
@@ -91,6 +92,12 @@ EAPI void eiotas_particle_merge(Eiotas_Particle *particle, const Eiotas_Particle
particle->merged = eina_inlist_append(particle->merged, EINA_INLIST_GET((Eiotas_Particle*)p));
}
+EAPI Eina_Bool eiotas_particle_has_dst(Eiotas_Particle *particle)
+{
+ if(eina_array_count_get(particle->dsts)<=particle->cur_dst) return EINA_FALSE;
+ return ( (eina_array_data_get(particle->dsts,particle->cur_dst)==NULL) ? EINA_FALSE : EINA_TRUE );
+}
+
EAPI void eiotas_particle_destinations_add(Eiotas_Particle *particle, const char* destinations)
{
int n;