Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_statement_at_font_face_rule_add_decl ( CRStatement *  a_this,
CRString *  a_prop,
CRTerm a_value 
)

Adds a declaration to the current -face rule statement.

Parameters:
a_this the current -face rule statement.
a_prop the property of the declaration.
a_value the value of the declaration.
Returns:
CR_OK upon successfull completion, an error code otherwise.

Definition at line 2291 of file cr-statement.c.

References AT_FONT_FACE_RULE_STMT, cr_declaration_append2(), and cr_declaration_ref().

{
        CRDeclaration *decls = NULL;

        g_return_val_if_fail (a_this
                              && a_this->type == AT_FONT_FACE_RULE_STMT
                              && a_this->kind.font_face_rule,
                              CR_BAD_PARAM_ERROR);

        decls = cr_declaration_append2
                (a_this->kind.font_face_rule->decl_list, 
                 a_prop, a_value);

        g_return_val_if_fail (decls, CR_ERROR);

        if (a_this->kind.font_face_rule->decl_list == NULL)
                cr_declaration_ref (decls);

        a_this->kind.font_face_rule->decl_list = decls;

        return CR_OK;
}


Generated by  Doxygen 1.6.0   Back to index