Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename and reorganize directory structure #1

Merged
merged 2 commits into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions xi-win-ui/Cargo.lock → Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "druid"
version = "0.1.0"
license = "Apache-2.0"
authors = ["Raph Levien <raph.levien@gmail.com>"]
description = "Data-oriented Rust UI design toolkit."
repository = "https://github.com/xi-editor/druid"
categories = ["gui"]
keywords = ["gui", "ui", "toolkit"]

[dependencies]
directwrite = "0.1.2"
direct2d = "0.2.0"

# this is only included for VK_ constants, maybe remove
winapi = "0.3.6"

[dependencies.druid-win-shell]
path = "druid-win-shell"
24 changes: 12 additions & 12 deletions xi-win-shell/Cargo.lock → druid-win-shell/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions xi-win-shell/Cargo.toml → druid-win-shell/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "xi-win-shell"
name = "druid-win-shell"
version = "0.1.0"
license = "Apache-2.0"
authors = ["Raph Levien <raph@google.com>"]
description = "Windows-specific application shell used for xi editor."
authors = ["Raph Levien <raph.levien@gmail.com>"]
description = "Windows-specific application shell used for druid toolkit."

[dependencies]
directwrite = "0.1.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

extern crate xi_win_shell;
extern crate druid_win_shell;
extern crate direct2d;

use std::any::Any;
Expand All @@ -22,11 +22,11 @@ use direct2d::math::*;
use direct2d::RenderTarget;
use direct2d::brush::SolidColorBrush;

use xi_win_shell::dialog::{FileDialogOptions, FileDialogType};
use xi_win_shell::menu::Menu;
use xi_win_shell::paint::PaintCtx;
use xi_win_shell::win_main;
use xi_win_shell::window::{MouseEvent, WindowBuilder, WindowHandle, WinHandler};
use druid_win_shell::dialog::{FileDialogOptions, FileDialogType};
use druid_win_shell::menu::Menu;
use druid_win_shell::paint::PaintCtx;
use druid_win_shell::win_main;
use druid_win_shell::window::{MouseEvent, WindowBuilder, WindowHandle, WinHandler};

#[derive(Default)]
struct HelloState {
Expand Down Expand Up @@ -96,7 +96,7 @@ impl WinHandler for HelloState {
}

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut file_menu = Menu::new();
file_menu.add_item(0x100, "E&xit");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

extern crate xi_win_shell;
extern crate druid_win_shell;
extern crate direct2d;
extern crate directwrite;
extern crate time;
Expand All @@ -27,10 +27,10 @@ use direct2d::RenderTarget;
use direct2d::brush::SolidColorBrush;
use directwrite::TextFormat;

use xi_win_shell::paint::PaintCtx;
use xi_win_shell::util::default_text_options;
use xi_win_shell::win_main;
use xi_win_shell::window::{PresentStrategy, WindowBuilder, WindowHandle, WinHandler};
use druid_win_shell::paint::PaintCtx;
use druid_win_shell::util::default_text_options;
use druid_win_shell::win_main;
use druid_win_shell::window::{PresentStrategy, WindowBuilder, WindowHandle, WinHandler};

struct PerfTest(RefCell<PerfState>);

Expand Down Expand Up @@ -122,7 +122,7 @@ impl WinHandler for PerfTest {
}

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut run_loop = win_main::RunLoop::new();
let mut builder = WindowBuilder::new();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ impl WindowHandle {
}

/// Get the raw HWND handle, for uses that are not wrapped in
/// xi_win_shell.
/// druid_win_shell.
pub fn get_hwnd(&self) -> Option<HWND> {
self.0.upgrade().map(|w| w.hwnd.get())
}
Expand Down
18 changes: 9 additions & 9 deletions xi-win-ui/examples/anim.rs → examples/anim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@

//! Example of animation frames.

extern crate xi_win_shell;
extern crate xi_win_ui;
extern crate druid_win_shell;
extern crate druid;
extern crate direct2d;
extern crate directwrite;

use direct2d::brush::SolidColorBrush;
use direct2d::RenderTarget;

use xi_win_shell::win_main;
use xi_win_shell::window::WindowBuilder;
use druid_win_shell::win_main;
use druid_win_shell::window::WindowBuilder;

use xi_win_ui::{UiMain, UiState, Ui};
use druid::{UiMain, UiState, Ui};

use xi_win_ui::{BoxConstraints, Geometry, LayoutResult};
use xi_win_ui::{HandlerCtx, Id, LayoutCtx, MouseEvent, PaintCtx};
use xi_win_ui::widget::Widget;
use druid::{BoxConstraints, Geometry, LayoutResult};
use druid::{HandlerCtx, Id, LayoutCtx, MouseEvent, PaintCtx};
use druid::widget::Widget;

/// A custom widget with animations.
struct AnimWidget(f32);
Expand Down Expand Up @@ -74,7 +74,7 @@ impl AnimWidget {
}

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut run_loop = win_main::RunLoop::new();
let mut builder = WindowBuilder::new();
Expand Down
16 changes: 8 additions & 8 deletions xi-win-ui/examples/calc.rs → examples/calc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@

extern crate winapi;

extern crate xi_win_shell;
extern crate xi_win_ui;
extern crate druid_win_shell;
extern crate druid;

use winapi::um::winuser::*;

use xi_win_shell::win_main;
use xi_win_shell::window::WindowBuilder;
use druid_win_shell::win_main;
use druid_win_shell::window::WindowBuilder;

use xi_win_ui::{KeyEvent, KeyVariant, UiMain, UiState};
use xi_win_ui::widget::{Button, Column, EventForwarder, KeyListener, Label, Row, Padding};
use druid::{KeyEvent, KeyVariant, UiMain, UiState};
use druid::widget::{Button, Column, EventForwarder, KeyListener, Label, Row, Padding};

use xi_win_ui::Id;
use druid::Id;

struct CalcState {
/// The number displayed. Generally a valid float.
Expand Down Expand Up @@ -261,7 +261,7 @@ fn action_for_key(event: &KeyEvent) -> Option<CalcAction> {
}

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut run_loop = win_main::RunLoop::new();
let mut builder = WindowBuilder::new();
Expand Down
14 changes: 7 additions & 7 deletions xi-win-ui/examples/dynamic.rs → examples/dynamic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@

//! An example of dynamic graph mutation.

extern crate xi_win_shell;
extern crate xi_win_ui;
extern crate druid_win_shell;
extern crate druid;
extern crate direct2d;
extern crate directwrite;

use std::collections::BTreeMap;

use xi_win_shell::win_main;
use xi_win_shell::window::WindowBuilder;
use druid_win_shell::win_main;
use druid_win_shell::window::WindowBuilder;

use xi_win_ui::{Id, UiMain, UiState};
use xi_win_ui::widget::{Button, Column, EventForwarder, Label, Row, Padding};
use druid::{Id, UiMain, UiState};
use druid::widget::{Button, Column, EventForwarder, Label, Row, Padding};

#[derive(Default)]
struct AppState {
Expand All @@ -43,7 +43,7 @@ enum Action {
}

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut run_loop = win_main::RunLoop::new();
let mut builder = WindowBuilder::new();
Expand Down
14 changes: 7 additions & 7 deletions xi-win-ui/examples/ext_event.rs → examples/ext_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@

//! Example of sending external events to the UI.

extern crate xi_win_shell;
extern crate xi_win_ui;
extern crate druid_win_shell;
extern crate druid;

use std::{thread, time};

use xi_win_shell::win_main;
use xi_win_shell::window::WindowBuilder;
use druid_win_shell::win_main;
use druid_win_shell::window::WindowBuilder;

use xi_win_ui::{UiMain, UiState};
use xi_win_ui::widget::Label;
use druid::{UiMain, UiState};
use druid::widget::Label;

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut run_loop = win_main::RunLoop::new();
let mut builder = WindowBuilder::new();
Expand Down
24 changes: 12 additions & 12 deletions xi-win-ui/examples/sample.rs → examples/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@

//! Sample GUI app.

extern crate xi_win_shell;
extern crate xi_win_ui;
extern crate druid_win_shell;
extern crate druid;
extern crate direct2d;
extern crate directwrite;

use direct2d::brush::SolidColorBrush;
use direct2d::RenderTarget;

use xi_win_shell::menu::Menu;
use xi_win_shell::win_main;
use xi_win_shell::window::WindowBuilder;
use druid_win_shell::menu::Menu;
use druid_win_shell::win_main;
use druid_win_shell::window::WindowBuilder;

use xi_win_ui::{UiMain, UiState, Ui};
use xi_win_ui::widget::{Button, Row, Padding};
use xi_win_ui::{FileDialogOptions, FileDialogType};
use druid::{UiMain, UiState, Ui};
use druid::widget::{Button, Row, Padding};
use druid::{FileDialogOptions, FileDialogType};

use xi_win_ui::{BoxConstraints, Geometry, LayoutResult};
use xi_win_ui::{Id, LayoutCtx, PaintCtx};
use xi_win_ui::widget::Widget;
use druid::{BoxConstraints, Geometry, LayoutResult};
use druid::{Id, LayoutCtx, PaintCtx};
use druid::widget::Widget;

const COMMAND_EXIT: u32 = 0x100;
const COMMAND_OPEN: u32 = 0x101;
Expand Down Expand Up @@ -63,7 +63,7 @@ impl FooWidget {
}

fn main() {
xi_win_shell::init();
druid_win_shell::init();

let mut file_menu = Menu::new();
file_menu.add_item(COMMAND_EXIT, "E&xit");
Expand Down
File renamed without changes.
Loading