Create iced_widget subcrate and re-organize the whole codebase

This commit is contained in:
Héctor Ramón Jiménez 2023-03-04 05:37:11 +01:00
parent c54409d171
commit 3a0d34c024
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
209 changed files with 1959 additions and 2183 deletions

View file

@ -7,4 +7,3 @@ publish = false
[dependencies]
iced = { path = "../.." }
iced_native = { path = "../../native" }

View file

@ -1,12 +1,10 @@
use iced::event::{Event, MacOS, PlatformSpecific};
use iced::executor;
use iced::subscription;
use iced::widget::{container, text};
use iced::{
Application, Command, Element, Length, Settings, Subscription, Theme,
};
use iced_native::{
event::{MacOS, PlatformSpecific},
Event,
};
pub fn main() -> iced::Result {
App::run(Settings::default())
@ -19,7 +17,7 @@ struct App {
#[derive(Debug, Clone)]
enum Message {
EventOccurred(iced_native::Event),
EventOccurred(Event),
}
impl Application for App {
@ -52,7 +50,7 @@ impl Application for App {
}
fn subscription(&self) -> Subscription<Message> {
iced_native::subscription::events().map(Message::EventOccurred)
subscription::events().map(Message::EventOccurred)
}
fn view(&self) -> Element<Message> {