Logo Search packages:      
Sourcecode: inkscape version File versions

gchar* cr_statement_to_string ( CRStatement *  a_this,
gulong  a_indent 
)

Serializes a css statement into a string

Parameters:
a_this the current statement to serialize
a_indent the number of white space of indentation.
Returns:
the serialized statement. Must be freed by the caller using g_free().

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

References AT_CHARSET_RULE_STMT, AT_FONT_FACE_RULE_STMT, AT_IMPORT_RULE_STMT, AT_MEDIA_RULE_STMT, AT_PAGE_RULE_STMT, cr_statement_at_page_rule_to_string(), cr_statement_charset_to_string(), cr_statement_font_face_rule_to_string(), cr_statement_media_rule_to_string(), cr_statement_ruleset_to_string(), and cr_utils_trace_info.

Referenced by cr_statement_dump(), and cr_stylesheet_to_string().

{
        gchar *str = NULL ;

        if (!a_this)
                return NULL;

        switch (a_this->type) {
        case RULESET_STMT:
                str = cr_statement_ruleset_to_string 
                        (a_this, a_indent);
                break;

        case AT_FONT_FACE_RULE_STMT:
                str = cr_statement_font_face_rule_to_string 
                        (a_this, a_indent) ;
                break;

        case AT_CHARSET_RULE_STMT:
                str = cr_statement_charset_to_string
                        (a_this, a_indent);                
                break;

        case AT_PAGE_RULE_STMT:
                str = cr_statement_at_page_rule_to_string
                        (a_this, a_indent);
                break;

        case AT_MEDIA_RULE_STMT:
                str = cr_statement_media_rule_to_string
                        (a_this, a_indent);
                break;

        case AT_IMPORT_RULE_STMT:
                str = cr_statement_import_rule_to_string
                        (a_this, a_indent);
                break;

        default:
                cr_utils_trace_info ("Statement unrecognized");
                break;
        }
        return str ;
}


Generated by  Doxygen 1.6.0   Back to index