[librsvg] Add a C getter for rsvg_state_get_cond_true()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Add a C getter for rsvg_state_get_cond_true()
- Date: Fri, 17 Mar 2017 03:45:17 +0000 (UTC)
commit 1652fdd81b9d2f653f9a5859d89f5e767d344449
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 16 21:43:25 2017 -0600
Add a C getter for rsvg_state_get_cond_true()
... and wrap it in Rust; we'll need it there.
rsvg-styles.c | 5 +++++
rsvg-styles.h | 3 +++
rust/src/drawing_ctx.rs | 5 +++++
3 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/rsvg-styles.c b/rsvg-styles.c
index b42c184..1a81f55 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -1805,3 +1805,8 @@ gboolean rsvg_state_is_overflow (RsvgState *state)
{
return state->overflow;
}
+
+gboolean rsvg_state_get_cond_true (RsvgState *state)
+{
+ return state->cond_true;
+}
diff --git a/rsvg-styles.h b/rsvg-styles.h
index 4ba3b67..e37f0e9 100644
--- a/rsvg-styles.h
+++ b/rsvg-styles.h
@@ -252,6 +252,9 @@ void rsvg_state_reconstruct (RsvgState * state, RsvgNode * current);
G_GNUC_INTERNAL
gboolean rsvg_state_is_overflow (RsvgState *state);
+G_GNUC_INTERNAL
+gboolean rsvg_state_get_cond_true (RsvgState *state);
+
G_END_DECLS
#endif /* RSVG_STYLES_H */
diff --git a/rust/src/drawing_ctx.rs b/rust/src/drawing_ctx.rs
index b4550aa..5395807 100644
--- a/rust/src/drawing_ctx.rs
+++ b/rust/src/drawing_ctx.rs
@@ -59,6 +59,7 @@ extern "C" {
fn rsvg_state_reinit (state: *mut RsvgState);
fn rsvg_state_reconstruct (state: *mut RsvgState, node: *const RsvgNode);
fn rsvg_state_is_overflow (state: *const RsvgState) -> bool;
+ fn rsvg_state_get_cond_true (state: *const RsvgState) -> bool;
fn rsvg_state_push (draw_ctx: *const RsvgDrawingCtx);
fn rsvg_state_pop (draw_ctx: *const RsvgDrawingCtx);
@@ -210,6 +211,10 @@ pub fn state_is_overflow (state: *const RsvgState) -> bool {
unsafe { rsvg_state_is_overflow (state) }
}
+pub fn state_get_cond_true (state: *const RsvgState) -> bool {
+ unsafe { rsvg_state_get_cond_true (state) }
+}
+
pub fn state_push (draw_ctx: *const RsvgDrawingCtx) {
unsafe {
rsvg_state_push (draw_ctx);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]