diff options
author | Robert Staudinger <robsta@gnome.org> | 2009-09-01 14:53:59 +0200 |
---|---|---|
committer | Robert Staudinger <robsta@gnome.org> | 2009-09-01 14:53:59 +0200 |
commit | 4e7867badc228edbed1aedb69b7690e2771c3e9b (patch) | |
tree | 757524cad3940c786dafb6817439c71a34dac8a3 /ccss/ccss-function-impl.h | |
parent | 22a09db8093b039b435322d756b7bbc4c6eca90f (diff) |
[function] Make function objects dynamically creatable and ref-counted.
Diffstat (limited to 'ccss/ccss-function-impl.h')
-rw-r--r-- | ccss/ccss-function-impl.h | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/ccss/ccss-function-impl.h b/ccss/ccss-function-impl.h index b6d19c2..fc08864 100644 --- a/ccss/ccss-function-impl.h +++ b/ccss/ccss-function-impl.h @@ -35,26 +35,14 @@ CCSS_BEGIN_DECLS -/* Let's just forward declare this, so we don't have to pull in <glib.h>. */ -struct _GSList; - -/** - * ccss_function_f: - * @args: argument-list passed to the function. - * @user_data: user data associated to the function handler. - * - * Prototype for a custom `CSS function' handler. - * - * Returns: the function's result as a string. - **/ -typedef char * (*ccss_function_f) (struct _GSList const *args, - void *user_data); +/* Avoid circular dependencies. */ +struct ccss_grammar_; /** * ccss_function_t: - * @name: identifier of the function, as used in CSS. - * @function: handler, see #ccss_function_f. - * @user_data: data to pass to the function handler. + * @name: identifier of the function, as used in CSS. + * @function: handler, see #ccss_function_f. + * @reference_count: the reference count. * * This datastructure represents one line in the libccss' consumers vtable. **/ @@ -62,9 +50,13 @@ struct ccss_function_ { /*< private >*/ CCSS_DEPRECATED (char const *name); CCSS_DEPRECATED (ccss_function_f function); - CCSS_DEPRECATED (void *user_data); + CCSS_DEPRECATED (unsigned int reference_count); }; +void +ccss_grammar_add_functions (struct ccss_grammar_ *self, + ccss_function_t *functions); + CCSS_END_DECLS #endif /* CCSS_FUNCTION_IMPL_H */ |