2003-06-11 06:20:48 -07:00
|
|
|
#ifndef EDJE_CC_H
|
|
|
|
#define EDJE_CC_H
|
|
|
|
|
2004-07-16 16:33:41 -07:00
|
|
|
#include "edje_main.h"
|
2003-06-11 06:20:48 -07:00
|
|
|
|
2008-06-28 02:11:48 -07:00
|
|
|
/*
|
|
|
|
* On Windows, if the file is not opened in binary mode,
|
|
|
|
* read does not return the correct size, because of
|
|
|
|
* CR / LF translation.
|
|
|
|
*/
|
|
|
|
#ifndef O_BINARY
|
|
|
|
# define O_BINARY 0
|
|
|
|
#endif
|
|
|
|
|
2003-06-12 15:34:51 -07:00
|
|
|
/* types */
|
2003-06-11 06:20:48 -07:00
|
|
|
typedef struct _New_Object_Handler New_Object_Handler;
|
|
|
|
typedef struct _New_Statement_Handler New_Statement_Handler;
|
2004-08-29 04:03:19 -07:00
|
|
|
typedef struct _Font_List Font_List;
|
2004-01-22 18:13:42 -08:00
|
|
|
typedef struct _Font Font;
|
2004-03-27 21:26:17 -08:00
|
|
|
typedef struct _Code Code;
|
|
|
|
typedef struct _Code_Program Code_Program;
|
2004-08-29 04:03:19 -07:00
|
|
|
typedef struct _SrcFile SrcFile;
|
|
|
|
typedef struct _SrcFile_List SrcFile_List;
|
2003-06-11 06:20:48 -07:00
|
|
|
|
|
|
|
struct _New_Object_Handler
|
|
|
|
{
|
2007-03-31 03:33:24 -07:00
|
|
|
const char *type;
|
2003-06-11 06:20:48 -07:00
|
|
|
void (*func)(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _New_Statement_Handler
|
|
|
|
{
|
2007-03-31 03:33:24 -07:00
|
|
|
const char *type;
|
2003-06-11 06:20:48 -07:00
|
|
|
void (*func)(void);
|
|
|
|
};
|
|
|
|
|
2004-08-29 04:03:19 -07:00
|
|
|
struct _Font_List
|
|
|
|
{
|
2008-10-22 04:34:42 -07:00
|
|
|
Eina_List *list;
|
2004-08-29 04:03:19 -07:00
|
|
|
};
|
|
|
|
|
2004-01-22 18:13:42 -08:00
|
|
|
struct _Font
|
|
|
|
{
|
|
|
|
char *file;
|
|
|
|
char *name;
|
|
|
|
};
|
|
|
|
|
2004-03-27 21:26:17 -08:00
|
|
|
struct _Code
|
|
|
|
{
|
2004-04-24 21:20:58 -07:00
|
|
|
int l1, l2;
|
2004-03-27 21:26:17 -08:00
|
|
|
char *shared;
|
2008-10-22 04:34:42 -07:00
|
|
|
Eina_List *programs;
|
2004-03-27 21:26:17 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Code_Program
|
|
|
|
{
|
2004-04-24 21:20:58 -07:00
|
|
|
int l1, l2;
|
2004-03-27 21:26:17 -08:00
|
|
|
int id;
|
|
|
|
char *script;
|
|
|
|
};
|
|
|
|
|
2004-08-29 04:03:19 -07:00
|
|
|
struct _SrcFile
|
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
char *file;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _SrcFile_List
|
|
|
|
{
|
2008-10-22 04:34:42 -07:00
|
|
|
Eina_List *list;
|
2004-08-29 04:03:19 -07:00
|
|
|
};
|
|
|
|
|
2003-06-12 15:34:51 -07:00
|
|
|
/* global fn calls */
|
|
|
|
void data_setup(void);
|
|
|
|
void data_write(void);
|
2003-06-13 20:06:36 -07:00
|
|
|
void data_queue_part_lookup(Edje_Part_Collection *pc, char *name, int *dest);
|
2003-06-16 06:55:13 -07:00
|
|
|
void data_queue_program_lookup(Edje_Part_Collection *pc, char *name, int *dest);
|
2003-06-13 20:06:36 -07:00
|
|
|
void data_queue_image_lookup(char *name, int *dest);
|
2004-10-19 09:37:20 -07:00
|
|
|
void data_queue_part_slave_lookup(int *master, int *slave);
|
|
|
|
void data_queue_image_slave_lookup(int *master, int *slave);
|
2006-08-05 18:45:45 -07:00
|
|
|
void data_queue_spectrum_lookup(char *name, int *dest);
|
|
|
|
void data_queue_spectrum_slave_lookup(int *master, int *slave);
|
2003-06-13 20:06:36 -07:00
|
|
|
void data_process_lookups(void);
|
2004-04-01 01:53:11 -08:00
|
|
|
void data_process_scripts(void);
|
|
|
|
void data_process_script_lookups(void);
|
2008-03-24 01:22:01 -07:00
|
|
|
|
2004-03-27 21:26:17 -08:00
|
|
|
|
|
|
|
int is_verbatim(void);
|
|
|
|
void track_verbatim(int on);
|
2004-04-24 21:20:58 -07:00
|
|
|
void set_verbatim(char *s, int l1, int l2);
|
2004-03-27 21:26:17 -08:00
|
|
|
char *get_verbatim(void);
|
2008-03-24 01:22:01 -07:00
|
|
|
int get_verbatim_line1(void);
|
|
|
|
int get_verbatim_line2(void);
|
2003-06-12 15:34:51 -07:00
|
|
|
void compile(void);
|
2003-07-22 22:19:50 -07:00
|
|
|
int is_param(int n);
|
2008-03-24 01:22:01 -07:00
|
|
|
int is_num(int n);
|
2003-06-12 06:02:28 -07:00
|
|
|
char *parse_str(int n);
|
|
|
|
int parse_enum(int n, ...);
|
2008-04-01 14:28:28 -07:00
|
|
|
int parse_flags(int n, ...);
|
2003-06-12 06:02:28 -07:00
|
|
|
int parse_int(int n);
|
|
|
|
int parse_int_range(int n, int f, int t);
|
2004-10-13 11:07:56 -07:00
|
|
|
int parse_bool(int n);
|
2003-06-12 06:02:28 -07:00
|
|
|
double parse_float(int n);
|
2003-07-07 00:55:18 -07:00
|
|
|
double parse_float_range(int n, double f, double t);
|
2004-10-23 13:12:21 -07:00
|
|
|
void check_arg_count(int n);
|
2008-04-01 14:28:28 -07:00
|
|
|
void check_min_arg_count(int n);
|
2003-06-12 15:34:51 -07:00
|
|
|
|
|
|
|
int object_handler_num(void);
|
|
|
|
int statement_handler_num(void);
|
|
|
|
|
2004-08-29 04:03:19 -07:00
|
|
|
void source_edd(void);
|
|
|
|
void source_fetch(void);
|
|
|
|
int source_append(Eet_File *ef);
|
|
|
|
SrcFile_List *source_load(Eet_File *ef);
|
2008-10-22 04:34:42 -07:00
|
|
|
int source_fontmap_save(Eet_File *ef, Eina_List *fonts);
|
2004-08-29 04:03:19 -07:00
|
|
|
Font_List *source_fontmap_load(Eet_File *ef);
|
2008-03-24 01:22:01 -07:00
|
|
|
|
2003-06-12 15:34:51 -07:00
|
|
|
void *mem_alloc(size_t size);
|
|
|
|
char *mem_strdup(const char *s);
|
|
|
|
#define SZ sizeof
|
|
|
|
|
|
|
|
/* global vars */
|
2008-10-22 04:34:42 -07:00
|
|
|
extern Eina_List *img_dirs;
|
|
|
|
extern Eina_List *fnt_dirs;
|
2003-06-11 06:20:48 -07:00
|
|
|
extern char *file_in;
|
|
|
|
extern char *file_out;
|
|
|
|
extern char *progname;
|
2003-06-16 06:55:13 -07:00
|
|
|
extern int verbose;
|
2004-08-31 22:41:26 -07:00
|
|
|
extern int no_lossy;
|
|
|
|
extern int no_comp;
|
|
|
|
extern int no_raw;
|
|
|
|
extern int min_quality;
|
|
|
|
extern int max_quality;
|
2003-06-11 06:20:48 -07:00
|
|
|
extern int line;
|
2008-10-22 04:34:42 -07:00
|
|
|
extern Eina_List *stack;
|
|
|
|
extern Eina_List *params;
|
2003-06-11 06:20:48 -07:00
|
|
|
extern Edje_File *edje_file;
|
2008-10-22 04:34:42 -07:00
|
|
|
extern Eina_List *edje_collections;
|
|
|
|
extern Eina_List *fonts;
|
|
|
|
extern Eina_List *codes;
|
|
|
|
extern Eina_List *defines;
|
|
|
|
extern Eina_List *aliases;
|
2003-06-11 06:20:48 -07:00
|
|
|
extern New_Object_Handler object_handlers[];
|
|
|
|
extern New_Statement_Handler statement_handlers[];
|
|
|
|
|
2004-08-31 22:41:26 -07:00
|
|
|
|
2003-06-11 06:20:48 -07:00
|
|
|
#endif
|