X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Flib%2FEmbryo.h;h=e7c1a7217ad2306a55e0613c9ce3fee901928418;hb=d721c88af095bd60495ec175a10c90e88958e706;hp=c9f97ce51eb8c3279069b0a664c74c9de04d0bed;hpb=151780ba2c3201e06b72454daffb36bc1e59fe8a;p=framework%2Fuifw%2Fembryo.git diff --git a/src/lib/Embryo.h b/src/lib/Embryo.h index c9f97ce..e7c1a72 100644 --- a/src/lib/Embryo.h +++ b/src/lib/Embryo.h @@ -44,7 +44,7 @@ extern "C" { EAPI extern Embryo_Version *embryo_version; - /* potentioal error values */ + /* potential error values */ typedef enum _Embryo_Error { EMBRYO_ERROR_NONE, @@ -75,23 +75,27 @@ extern "C" { EMBRYO_ERROR_DOMAIN, /** Domain error, expression result does not fit in range */ } Embryo_Error; - /* possible function type values that are enumerated */ -#define EMBRYO_FUNCTION_NONE 0x7fffffff /* An invalid/non existent function */ -#define EMBRYO_FUNCTION_MAIN -1 /* Start at program entry point */ -#define EMBRYO_FUNCTION_CONT -2 /* Continue from last address */ - /** An invalid cell reference */ -#define EMBRYO_CELL_NONE 0x7fffffff /* program run return values */ -#define EMBRYO_PROGRAM_OK 1 -#define EMBRYO_PROGRAM_SLEEP 2 -#define EMBRYO_PROGRAM_BUSY 3 -#define EMBRYO_PROGRAM_TOOLONG 4 -#define EMBRYO_PROGRAM_FAIL 0 - + typedef enum _Embryo_Status + { + EMBRYO_PROGRAM_FAIL = 0, + EMBRYO_PROGRAM_OK = 1, + EMBRYO_PROGRAM_SLEEP = 2, + EMBRYO_PROGRAM_BUSY = 3, + EMBRYO_PROGRAM_TOOLONG = 4 + } Embryo_Status; + typedef unsigned int Embryo_UCell; typedef int Embryo_Cell; + /** An invalid cell reference */ +#define EMBRYO_CELL_NONE 0x7fffffff + typedef struct _Embryo_Program Embryo_Program; typedef int Embryo_Function; + /* possible function type values that are enumerated */ +#define EMBRYO_FUNCTION_NONE 0x7fffffff /* An invalid/non existent function */ +#define EMBRYO_FUNCTION_MAIN -1 /* Start at program entry point */ +#define EMBRYO_FUNCTION_CONT -2 /* Continue from last address */ typedef union { @@ -140,7 +144,7 @@ extern "C" { EAPI Embryo_Cell embryo_data_heap_push(Embryo_Program *ep, int cells); EAPI void embryo_data_heap_pop(Embryo_Program *ep, Embryo_Cell down_to); EAPI int embryo_program_recursion_get(Embryo_Program *ep); - EAPI int embryo_program_run(Embryo_Program *ep, Embryo_Function func); + EAPI Embryo_Status embryo_program_run(Embryo_Program *ep, Embryo_Function func); EAPI Embryo_Cell embryo_program_return_value_get(Embryo_Program *ep); EAPI void embryo_program_max_cycle_run_set(Embryo_Program *ep, int max); EAPI int embryo_program_max_cycle_run_get(Embryo_Program *ep);