Logo Search packages:      
Sourcecode: inkscape version File versions

CRSelEng* cr_sel_eng_new ( void   ) 

Creates a new instance of CRSelEng.

Returns:
the newly built instance of CRSelEng of NULL if an error occurs.

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

References cr_sel_eng_register_pseudo_class_sel_handler(), and cr_utils_trace_info.

Referenced by sp_repr_sel_eng().

{
        CRSelEng *result = NULL;

        result = (CRSelEng *) g_try_malloc (sizeof (CRSelEng));
        if (!result) {
                cr_utils_trace_info ("Out of memory");
                return NULL;
        }
        memset (result, 0, sizeof (CRSelEng));

        PRIVATE (result) = (CRSelEngPriv *) g_try_malloc (sizeof (CRSelEngPriv));
        if (!PRIVATE (result)) {
                cr_utils_trace_info ("Out of memory");
                g_free (result);
                return NULL;
        }
        memset (PRIVATE (result), 0, sizeof (CRSelEngPriv));
        cr_sel_eng_register_pseudo_class_sel_handler
                (result, "first-child",
                 IDENT_PSEUDO, /*(CRPseudoClassSelectorHandler)*/
                 first_child_pseudo_class_handler);
        cr_sel_eng_register_pseudo_class_sel_handler
                (result, "lang",
                 FUNCTION_PSEUDO, /*(CRPseudoClassSelectorHandler)*/
                 lang_pseudo_class_handler);

        return result;
}


Generated by  Doxygen 1.6.0   Back to index