Skip to content

Commit

Permalink
Some general updates
Browse files Browse the repository at this point in the history
  • Loading branch information
eshikafe committed Jul 15, 2023
1 parent 8371795 commit 1a3ecf8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
32 changes: 18 additions & 14 deletions src/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,56 @@ pub const CURRENT_CANVAS_VERSION: &str = "1.2";

pub struct Canvas {
// Contains the ID string for the Canvas
// \see get_id(), set_id() */
// see get_id(), set_id()
id_: String,

// Contains the name of the Canvas
// \see set_name(), get_name() */
// see set_name(), get_name()
name_: String,

// Contains a description of the Canvas
// \see set_description(), get_description() */
// see set_description(), get_description()
description_: String,

// Contains the canvas' version string
// \see set_version(), get_version() */
// see set_version(), get_version()
version_: String,

// Contains the author's name
// \see set_author(), get_author() */
// see set_author(), get_author()
author_: String,

// File name of Canvas
// \see get_file_name(), set_file_name() */
// see get_file_name(), set_file_name()
file_name_: String,

// File identifier of Canvas
// \see get_identifier(), set_identifier() */
// see get_identifier(), set_identifier()
// identifier_FileSystem::Identifier,

// Metadata map for Canvas.
// \see get_meta_data(), set_meta_data(), erase_meta_data() */
// see get_meta_data(), set_meta_data(), erase_meta_data()
meta_data_: HashMap<String, String>,

// Contains a list of ValueNodes that are in this Canvas
// \see value_node_list(), find_value_node() */
// see value_node_list(), find_value_node()
// value_node_list_ValueNodeList,

// Contains a list of Keyframes that are in the Canvas
// \see keyframe_list()*/
// see keyframe_list()
// keyframe_list_: KeyframeList,

// A handle to the parent canvas of this canvas.
// If canvas is a root canvas, then this handle is empty
// \see parent()
// see parent()
// parent_LooseHandle,

// List containing any child Canvases
// \see children() */
// see children() */
// children_: Children,

// Render Description for Canvas
// \see rend_desc() */
// see rend_desc() */
// RendDesc desc_;

// Contains the value of the last call to set_time()
Expand Down Expand Up @@ -82,4 +82,8 @@ pub struct Canvas {

}

pub type Handle = i32;
pub type Handle = i32;
pub type LooseHandle = i32;
pub type ConstHandle = i32;

pub type Children = Vec<Handle>;
2 changes: 2 additions & 0 deletions src/loadcanvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ use crate::vector::*;
use crate::segment::Segment;
use crate::layer::*;

// Returns the Open Canvases Map.
// using OpenCanvasMap = std::map<Canvas::LooseHandle, std::string>;
type OpenCanvasMap = HashMap<i32, String>;

lazy_static! {
Expand Down
6 changes: 3 additions & 3 deletions src/uniqueid.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static mut uniqueid_pool: i32 = 0;
static mut UNIQUEID_POOL: i32 = 0;

#[derive(Debug, PartialEq, PartialOrd)]
pub struct UniqueID
Expand Down Expand Up @@ -46,8 +46,8 @@ impl UniqueID {

fn next_id(&self) -> i32 {
unsafe {
uniqueid_pool += 1;
uniqueid_pool
UNIQUEID_POOL += 1;
UNIQUEID_POOL
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/valuenode.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
pub struct ValueNode {}
pub struct ValueNode {
// _type: Type,
// name: String,
// canvas: Vec<Canvas>,
// root_canvas: Vec<Canvas>,
}

// impl ValueNode {
// pub type Handle = i32;
// }

pub type Handle = i32;
pub type Handle = i32;
pub type LooseHandle = i32;

0 comments on commit 1a3ecf8

Please sign in to comment.