[librsvg: 2/8] css.rs: Basic skeleton for the CRDocHandler vtable
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/8] css.rs: Basic skeleton for the CRDocHandler vtable
- Date: Wed, 26 Sep 2018 23:54:51 +0000 (UTC)
commit 62effee5c71892ab1746fded564bcbc136f4807e
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Sep 25 08:47:46 2018 -0500
css.rs: Basic skeleton for the CRDocHandler vtable
rsvg_internals/src/css.rs | 50 ++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 09e372bd..689cfcbd 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -5,9 +5,10 @@ use std::str::FromStr;
use libc;
use glib::translate::*;
-use glib_sys;
+use glib_sys::{self, gboolean, GList};
use attributes::Attribute;
+use croco::*;
use state::State;
use util::utf8_cstr;
@@ -77,6 +78,53 @@ impl CssStyles {
}
}
+fn init_cr_doc_handler(handler: &mut CRDocHandler) {
+ handler.import_style = Some(css_import_style);
+ handler.start_selector = Some(css_start_selector);
+ handler.end_selector = Some(css_end_selector);
+ handler.property = Some(css_property);
+ handler.error = Some(css_error);
+ handler.unrecoverable_error = Some(css_unrecoverable_error);
+}
+
+unsafe extern "C" fn css_import_style(
+ a_this: *mut CRDocHandler,
+ a_media_list: *mut GList,
+ a_uri: CRString,
+ a_uri_default_ns: CRString,
+ a_location: CRParsingLocation,
+) {
+ unimplemented!();
+}
+
+unsafe extern "C" fn css_start_selector(
+ a_this: *mut CRDocHandler,
+ a_selector_list: *mut CRSelector,
+) {
+ unimplemented!();
+}
+
+unsafe extern "C" fn css_end_selector(a_this: *mut CRDocHandler, a_selector_list: *mut CRSelector) {
+ unimplemented!();
+}
+
+unsafe extern "C" fn css_property(
+ a_this: *mut CRDocHandler,
+ a_name: CRString,
+ a_expression: CRTerm,
+ a_is_important: gboolean,
+) {
+ unimplemented!();
+}
+
+unsafe extern "C" fn css_error(a_this: *mut CRDocHandler) {
+ unimplemented!();
+}
+
+unsafe extern "C" fn css_unrecoverable_error(a_this: *mut CRDocHandler) {
+ unimplemented!();
+}
+
#[no_mangle]
pub extern "C" fn rsvg_css_styles_new() -> *mut RsvgCssStyles {
Box::into_raw(Box::new(CssStyles::new())) as *mut RsvgCssStyles
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]