Skip to content
  • Federico Mena Quintero's avatar
    cnode.rs: New function rsvg_rust_cnode_get_impl() to fetch the C-side implementation · 5d524850
    Federico Mena Quintero authored
    We need this for a couple of special cases that are *not*
    implementations of node methods and yet want to use the impl structures.
    For example, rsvg_handle_get_dimensions_sub() wants to peek at the
    toplevel svg->vbox.
    
    We add a Node.get_c_impl() method, and a NodeTrait.get_c_impl().  The
    CNode actually implements this last one by returning its stored
    c_node_impl.  Nodes implemented fully in Rust will return just a null
    pointer.
    
    We can hopefully remove that method once everything is implemented in Rust.
    
    * Move rsvg-structure.[ch] over to rsvg_rust_cnode_new()
    
    The new rsvg_foo_node_new() functions use rsvg_rust_cnode_new()
    internally instead of the old _rsvg_node_init().  Also, the RsvgFooNode
    structs don't have a "super" field anymore, since RsvgNode is now an
    opaque struct from the Rust code.
    
    We re-do the virtual methods for all of rsvg-structure.c.  Other files
    will follow.
    
    * Move rsvg-shapes.[ch] over to rsvg_rust_cnode_new().
    5d524850