Skip to content

Commit 54f4475

Browse files
committed
Move Program to application module
1 parent 7e1ef7d commit 54f4475

29 files changed

Lines changed: 58 additions & 80 deletions

File tree

examples/arc/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use iced::widget::canvas::{
77
use iced::{Element, Length, Point, Rectangle, Renderer, Subscription, Theme};
88

99
pub fn main() -> iced::Result {
10-
iced::application("Arc - Iced", Arc::update, Arc::view)
10+
iced::program("Arc - Iced", Arc::update, Arc::view)
1111
.subscription(Arc::subscription)
1212
.theme(|_| Theme::Dark)
1313
.antialiasing(true)

examples/bezier_tool/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use iced::widget::{button, column, text};
33
use iced::{Alignment, Element, Length};
44

55
pub fn main() -> iced::Result {
6-
iced::application("Bezier Tool - Iced", Example::update, Example::view)
6+
iced::program("Bezier Tool - Iced", Example::update, Example::view)
77
.antialiasing(true)
88
.run()
99
}

examples/checkbox/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use iced::{Element, Font, Length};
44
const ICON_FONT: Font = Font::with_name("icons");
55

66
pub fn main() -> iced::Result {
7-
iced::application("Checkbox - Iced", Example::update, Example::view)
7+
iced::program("Checkbox - Iced", Example::update, Example::view)
88
.font(include_bytes!("../fonts/icons.ttf").as_slice())
99
.run()
1010
}

examples/clock/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use iced::{
88
};
99

1010
pub fn main() -> iced::Result {
11-
iced::application("Clock - Iced", Clock::update, Clock::view)
11+
iced::program("Clock - Iced", Clock::update, Clock::view)
1212
.subscription(Clock::subscription)
1313
.theme(Clock::theme)
1414
.antialiasing(true)

examples/color_palette/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::marker::PhantomData;
1313
use std::ops::RangeInclusive;
1414

1515
pub fn main() -> iced::Result {
16-
iced::application(
16+
iced::program(
1717
"Color Palette - Iced",
1818
ColorPalette::update,
1919
ColorPalette::view,

examples/custom_shader/src/main.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ use iced::window;
99
use iced::{Alignment, Color, Element, Length, Subscription};
1010

1111
fn main() -> iced::Result {
12-
iced::application(
13-
"Custom Shader - Iced",
14-
IcedCubes::update,
15-
IcedCubes::view,
16-
)
17-
.subscription(IcedCubes::subscription)
18-
.run()
12+
iced::program("Custom Shader - Iced", IcedCubes::update, IcedCubes::view)
13+
.subscription(IcedCubes::subscription)
14+
.run()
1915
}
2016

2117
struct IcedCubes {

examples/download_progress/src/main.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ use iced::widget::{button, column, container, progress_bar, text, Column};
44
use iced::{Alignment, Element, Length, Subscription};
55

66
pub fn main() -> iced::Result {
7-
iced::application(
8-
"Download Progress - Iced",
9-
Example::update,
10-
Example::view,
11-
)
12-
.subscription(Example::subscription)
13-
.run()
7+
iced::program("Download Progress - Iced", Example::update, Example::view)
8+
.subscription(Example::subscription)
9+
.run()
1410
}
1511

1612
#[derive(Debug)]

examples/events/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use iced::window;
55
use iced::{Alignment, Command, Element, Length, Subscription};
66

77
pub fn main() -> iced::Result {
8-
iced::application("Events - Iced", Events::update, Events::view)
8+
iced::program("Events - Iced", Events::update, Events::view)
99
.subscription(Events::subscription)
1010
.exit_on_close_request(false)
1111
.run()

examples/exit/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use iced::window;
33
use iced::{Alignment, Command, Element, Length};
44

55
pub fn main() -> iced::Result {
6-
iced::application("Exit - Iced", Exit::update, Exit::view).run()
6+
iced::program("Exit - Iced", Exit::update, Exit::view).run()
77
}
88

99
#[derive(Default)]

examples/gradient/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use iced::{Alignment, Color, Element, Length, Radians, Theme};
88
pub fn main() -> iced::Result {
99
tracing_subscriber::fmt::init();
1010

11-
iced::application("Gradient - Iced", Gradient::update, Gradient::view)
11+
iced::program("Gradient - Iced", Gradient::update, Gradient::view)
1212
.style(Gradient::style)
1313
.transparent(true)
1414
.run()

0 commit comments

Comments
 (0)