Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

enum CRStatus cr_sel_eng_register_pseudo_class_sel_handler ( CRSelEng *  a_this,
char *  a_name,
enum CRPseudoType  a_type,
CRPseudoClassSelectorHandler  a_handler 

Adds a new handler entry in the handlers entry table.

a_this the current instance of CRSelEng
a_pseudo_class_sel_name the name of the pseudo class selector.
a_pseudo_class_type the type of the pseudo class selector.
a_handler the actual handler or callback to be called during the selector evaluation process.
CR_OK, upon successful completion, an error code otherwise.

Definition at line 1134 of file cr-sel-eng.c.

Referenced by cr_sel_eng_new().

        struct CRPseudoClassSelHandlerEntry *handler_entry = NULL;
        GList *list = NULL;

        g_return_val_if_fail (a_this && PRIVATE (a_this)
                              && a_handler && a_name, CR_BAD_PARAM_ERROR);

        handler_entry = (struct CRPseudoClassSelHandlerEntry *) g_try_malloc
                (sizeof (struct CRPseudoClassSelHandlerEntry));
        if (!handler_entry) {
                return CR_OUT_OF_MEMORY_ERROR;
        memset (handler_entry, 0,
                sizeof (struct CRPseudoClassSelHandlerEntry));
        handler_entry->name = g_strdup (a_name);
        handler_entry->type = a_type;
        handler_entry->handler = a_handler;
        list = g_list_append (PRIVATE (a_this)->pcs_handlers, handler_entry);
        if (!list) {
                return CR_OUT_OF_MEMORY_ERROR;
        PRIVATE (a_this)->pcs_handlers = list;
        return CR_OK;

Generated by  Doxygen 1.6.0   Back to index