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

CRStatement* cr_statement_new_at_import_rule ( CRStyleSheet a_container_sheet,
CRString *  a_url,
GList *  a_media_list,
CRStyleSheet a_imported_sheet 
)

Creates a new instance of CRStatment of type CRAtImportRule.

Parameters:
a_url the url to connect to the get the file to be imported.
a_sheet the imported parsed stylesheet.
Returns:
the newly built instance of CRStatement.

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

References AT_IMPORT_RULE_STMT, cr_statement_set_parent_sheet(), and cr_utils_trace_info.

Referenced by cr_statement_at_import_rule_parse_from_buf().

{
        CRStatement *result = NULL;

        result = g_try_malloc (sizeof (CRStatement));

        if (!result) {
                cr_utils_trace_info ("Out of memory");
                return NULL;
        }

        memset (result, 0, sizeof (CRStatement));
        result->type = AT_IMPORT_RULE_STMT;

        result->kind.import_rule = g_try_malloc (sizeof (CRAtImportRule));

        if (!result->kind.import_rule) {
                cr_utils_trace_info ("Out of memory");
                g_free (result);
                return NULL;
        }

        memset (result->kind.import_rule, 0, sizeof (CRAtImportRule));
        result->kind.import_rule->url = a_url;
        result->kind.import_rule->media_list = a_media_list;
        result->kind.import_rule->sheet = a_imported_sheet;
        if (a_container_sheet)
                cr_statement_set_parent_sheet (result, a_container_sheet);

        return result;
}


Generated by  Doxygen 1.6.0   Back to index