Commit 2be6818d authored by Florian Blasius's avatar Florian Blasius 🤘

Rename structs crate to utils.

parent 66cc7907
This diff is collapsed.
......@@ -28,7 +28,7 @@ orbimage = "0.1.17"
orbclient = "0.3.22"
[dependencies]
orbtk-structs = { version = "0.1.0", path = "crates/structs" }
orbtk-utils = { version = "0.1.0", path = "crates/utils" }
orbtk-css-engine = { version = "0.1.0", path = "crates/css-engine" }
orbtk-tree = { version = "0.1.0", path="crates/tree" }
lazy_static = "1.3.0"
......@@ -41,6 +41,6 @@ orbgl_api = { git = "https://gitlab.redox-os.org/redox-os/orbgl.git" }
[workspace]
members = [
"crates/css-engine",
"crates/structs",
"crates/utils",
"crates/tree"
]
\ No newline at end of file
......@@ -9,5 +9,5 @@ keywords = ["css", "theme", "styling", "ui"]
edition = "2018"
[dependencies]
orbtk-structs = { version = "0.1.0", path = "../structs" }
orbtk-utils = { version = "0.1.0", path = "../utils" }
cssparser = "0.17.0"
\ No newline at end of file
......@@ -7,7 +7,7 @@ use cssparser::{
Token,
};
use orbtk_structs::prelude::*;
use orbtk_utils::prelude::*;
use crate::prelude::*;
......
[package]
name = "orbtk-structs"
name = "orbtk-utils"
version = "0.1.0"
authors = ["Florian Blasius <flovanpt@posteo.de>"]
description = "Helper structs and traits for OrbTk."
description = "Helper utils and traits for OrbTk."
repository = "https://gitlab.redox-os.org/redox-os/orbtk"
license = "MIT"
keywords = ["helpers", "structs", "traits", "ui"]
keywords = ["helpers", "utils", "traits", "ui"]
edition = "2018"
[dependencies]
......
......@@ -4,10 +4,7 @@ use std::sync::Arc;
use orbclient::{Color, Renderer as OrbRenderer, Window as OrbWindow};
use orbfont::Font;
use crate::backend::Renderer;
use crate::properties::Bounds;
use crate::structs::{Point, Position, Size};
use crate::styling::fonts::*;
use crate::{prelude::*, styling::fonts::*, backend::Renderer};
pub struct OrbFontRenderer {
pub fonts: HashMap<&'static str, Font>,
......
use std::rc::Rc;
use crate::{
event::{Event, EventBox, EventHandler},
properties::*,
structs::*,
widgets::{Widget, WidgetContainer},
};
use crate::prelude::*;
/// Checks if the given point is inside of a widget.
pub fn check_mouse_condition(mouse_position: Point, widget: &WidgetContainer<'_>) -> bool {
......
......@@ -16,7 +16,7 @@ pub use crate::event::*;
pub use crate::layout::*;
pub use crate::properties::*;
pub use crate::render_object::*;
pub use crate::structs::*;
pub use crate::utils::*;
pub use crate::styling::theme::{DEFAULT_THEME_CSS, LIGHT_THEME_EXTENSION_CSS};
pub use crate::styling::vector_graphics::*;
pub use crate::systems::*;
......@@ -24,7 +24,7 @@ pub use crate::widgets::*;
pub use dces::prelude::*;
pub use orbtk_css_engine::prelude as css_engine;
pub use orbtk_structs::prelude as structs;
pub use orbtk_utils::prelude as utils;
pub use orbtk_tree::prelude as tree;
......
......@@ -15,7 +15,7 @@ pub use crate::{
layout::*,
properties::*,
render_object::*,
structs::*,
utils::*,
styling::*,
widgets::*,
widget,
......
use orbgl_api::Canvas;
use crate::{
backend::Renderer,
properties::{Bounds, FontIcon, IconBrush, IconFont, IconSize},
render_object::RenderObject,
structs::Point,
widgets::Context,
};
use crate::{prelude::*, backend::Renderer};
pub struct FontIconRenderObject;
......
use orbgl_api::Canvas;
use crate::{
backend::Renderer,
properties::{Bounds, Image},
render_object::RenderObject,
structs::{Point, Size},
widgets::Context,
};
use crate::{prelude::*, backend::Renderer};
/// Used to render an image.
pub struct ImageRenderObject;
......
......@@ -4,9 +4,7 @@ use std::any::Any;
use orbgl_api::Canvas;
use crate::backend::Renderer;
use crate::structs::Point;
use crate::widgets::Context;
use crate::{prelude::*, backend::Renderer};
pub use self::font_icon::*;
pub use self::image::*;
......
use orbgl_api::Canvas;
use crate::{
backend::Renderer,
properties::*,
render_object::RenderObject,
structs::{Point, Brush, Position, Size, Thickness},
widgets::Context,
};
use crate::{prelude::*, backend::Renderer};
pub struct RectangleRenderObject;
......
use orbgl_api::Canvas;
use crate::{
backend::Renderer,
properties::*,
render_object::RenderObject,
structs::Point,
widgets::Context,
};
use crate::{prelude::*, backend::Renderer};
/// Used to render a text.
pub struct TextRenderObject;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment