X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/714b58ab4606ed4d40cec3702cb378938f8c883f..7231d76fbf4ae0b501af648e1216b88714aa7353:/src/treefuncs.h diff --git a/src/treefuncs.h b/src/treefuncs.h index 4d60558..f7ba204 100644 --- a/src/treefuncs.h +++ b/src/treefuncs.h @@ -2,9 +2,8 @@ * Do not edit by hand! */ -#ifndef _TREEFUNCS_H_ - -#define _TREEFUNCS_H_ +#ifndef TREEFUNCS_H +#define TREEFUNCS_H /* for ccode type */ enum { @@ -49,6 +48,8 @@ enum { }; + +typedef long NodeType; enum { CLASS_NODE, TYPE_NODE, @@ -56,6 +57,7 @@ enum { CHECK_NODE, FUNCARG_NODE, ARGUMENT_NODE, + PROPERTY_NODE, METHOD_NODE, VARIABLE_NODE, LAST_NODE_TYPE @@ -68,12 +70,13 @@ typedef struct _CCode CCode; typedef struct _Check Check; typedef struct _FuncArg FuncArg; typedef struct _Argument Argument; +typedef struct _Property Property; typedef struct _Method Method; typedef struct _Variable Variable; struct _Argument { - int type; + NodeType type; char * gtktype; Type * atype; GList * flags; @@ -86,35 +89,36 @@ struct _Argument { }; struct _CCode { - int type; + NodeType type; int cctype; char * cbuf; int line_no; }; struct _Check { - int type; + NodeType type; int chtype; char * number; }; struct _Class { - int type; + NodeType type; char * otype; char * ptype; + char * bonobo_x_class; char * chunk_size; GList * nodes; }; struct _FuncArg { - int type; + NodeType type; Type * atype; char * name; GList * checks; }; struct _Method { - int type; + NodeType type; int scope; int method; Type * mtype; @@ -130,21 +134,44 @@ struct _Method { int ccode_line; gboolean vararg; int unique_id; + gboolean bonobo_x_func; +}; + +struct _Property { + NodeType type; + char * gtktype; + Type * ptype; + GList * flags; + char * name; + char * nick; + char * blurb; + char * minimum; + char * maximum; + char * default_value; + char * extra_gtktype; + gboolean link; + gboolean export; + char * get; + int get_line; + char * set; + int set_line; + int line_no; }; struct _Type { - int type; + NodeType type; char * name; char * pointer; char * postfix; }; struct _Variable { - int type; + NodeType type; int scope; Type * vtype; char * id; int line_no; + gboolean destructor_unref; char * destructor; int destructor_line; gboolean destructor_simple; @@ -153,52 +180,29 @@ struct _Variable { }; union _Node { - int type; + NodeType type; Argument argument; CCode ccode; Check check; Class class; FuncArg funcarg; Method method; + Property property; Type _type; Variable variable; }; -/* New functions */ -Node * new_argument (char * gtktype, Type * atype, GList * flags, char * name, char * get, int get_line, char * set, int set_line, int line_no); -Node * new_ccode (int cctype, char * cbuf, int line_no); -Node * new_check (int chtype, char * number); -Node * new_class (char * otype, char * ptype, char * chunk_size, GList * nodes); -Node * new_funcarg (Type * atype, char * name, GList * checks); -Node * new_method (int scope, int method, Type * mtype, char * otype, GList * gtktypes, GList * flags, char * id, GList * args, char * onerror, char * defreturn, char * cbuf, int line_no, int ccode_line, gboolean vararg, int unique_id); -Node * new_type (char * name, char * pointer, char * postfix); -Node * new_variable (int scope, Type * vtype, char * id, int line_no, char * destructor, int destructor_line, gboolean destructor_simple, char * initializer, int initializer_line); /* General copy/free functions */ -Node * copy_node(Node *node); -void free_node(Node *node); - -GList * copy_node_list(GList *nodes); -void free_node_list(GList *nodes); - -/* Copy functions */ -Argument * copy_argument (Argument * self); -CCode * copy_ccode (CCode * self); -Check * copy_check (Check * self); -Class * copy_class (Class * self); -FuncArg * copy_funcarg (FuncArg * self); -Method * copy_method (Method * self); -Type * copy_type (Type * self); -Variable * copy_variable (Variable * self); - -/* Free functions */ -void free_argument (Argument * self); -void free_ccode (CCode * self); -void free_check (Check * self); -void free_class (Class * self); -void free_funcarg (FuncArg * self); -void free_method (Method * self); -void free_type (Type * self); -void free_variable (Variable * self); - -#endif /*_TREEFUNCS_H_*/ +Node * node_copy (Node *node); +void node_free (Node *node); + +GList * node_list_copy (GList *nodes); +void node_list_free (GList *nodes); + +/* Node new/set functions */ +Node * node_new (NodeType type, ...); +void node_set (Node *node, ...); + + +#endif /* TREEFUNCS_H */