Skip to content

Commit 8089efa

Browse files
authored
[Minor] Feat/presentation app (#34)
1 parent 55ea6d9 commit 8089efa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+7522080
-19
lines changed

anasos-kernel/src/apps/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub static APPS_UPDATE_WAKER: AtomicWaker = AtomicWaker::new();
2525
pub static APPS_CURRENTLY_UPDATING: AtomicBool = AtomicBool::new(false);
2626

2727
pub mod terminal;
28+
pub mod presentation;
2829

2930
pub static APPS_QUEUE: OnceCell<Arc<ArrayQueue<Box<(dyn App + 'static)>>>> = OnceCell::uninit();
3031
pub static APPS_SCANNCODE_QUEUE: OnceCell<Arc<ArrayQueue<u8>>> = OnceCell::uninit();
@@ -87,9 +88,10 @@ pub trait App: Send + Sync {
8788
fn scancode_push(&self, scancode: u8) -> Result<(), ()>;
8889

8990
// lifecycle methods
90-
fn init(&self);
91+
fn init(&mut self);
9192
unsafe fn draw(&mut self);
9293
fn update(&mut self);
94+
fn log(&self, message: &str);
9395
}
9496

9597
pub struct AppList {
@@ -170,7 +172,8 @@ impl AppList {
170172
}
171173

172174
let app_queue = app_queue.unwrap();
173-
while let Some(app) = app_queue.pop() {
175+
while let Some(mut app) = app_queue.pop() {
176+
174177
app.init(); // NOTE: this may not be the right place to call init
175178
self.push(app);
176179
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
pub mod slide0_data;
2+
pub mod slide1_data;
3+
pub mod slide2_data;
4+
pub mod slide3_data;
5+
pub mod slide4_data;
6+
pub mod slide5_data;
7+
pub mod slide6_data;
8+
pub mod slide7_data;
9+
pub mod slide8_data;
10+
pub mod slide9_data;
11+
pub mod slide10_data;
12+
pub mod slide11_data;
13+
pub mod slide12_data;
14+
pub mod slide13_data;
15+
pub mod slide14_data;
16+
pub mod slide15_data;
17+
pub mod slide16_data;
18+
pub mod slide17_data;
19+
pub mod slide18_data;
20+
pub mod slide19_data;
21+
pub mod slide20_data;
22+
pub mod slide21_data;
23+
pub mod slide22_data;
24+
pub mod slide23_data;
25+
pub mod slide24_data;
26+
pub mod slide25_data;
27+
pub mod slide26_data;
28+
pub mod slide27_data;
29+
pub mod slide28_data;
30+
// pub mod slide29_data;
31+
32+
// Aggregated slice of all slides
33+
pub const SLIDES: &[&[u8]] = &[
34+
&slide0_data::SLIDE_0_PPM,
35+
&slide1_data::SLIDE_1_PPM,
36+
&slide2_data::SLIDE_2_PPM,
37+
&slide3_data::SLIDE_3_PPM,
38+
&slide4_data::SLIDE_4_PPM,
39+
&slide5_data::SLIDE_5_PPM,
40+
&slide6_data::SLIDE_6_PPM,
41+
&slide7_data::SLIDE_7_PPM,
42+
&slide8_data::SLIDE_8_PPM,
43+
&slide9_data::SLIDE_9_PPM,
44+
&slide10_data::SLIDE_10_PPM,
45+
&slide11_data::SLIDE_11_PPM,
46+
&slide12_data::SLIDE_12_PPM,
47+
&slide13_data::SLIDE_13_PPM,
48+
&slide14_data::SLIDE_14_PPM,
49+
&slide15_data::SLIDE_15_PPM,
50+
&slide16_data::SLIDE_16_PPM,
51+
&slide17_data::SLIDE_17_PPM,
52+
&slide18_data::SLIDE_18_PPM,
53+
&slide19_data::SLIDE_19_PPM,
54+
&slide20_data::SLIDE_20_PPM,
55+
&slide21_data::SLIDE_21_PPM,
56+
&slide22_data::SLIDE_22_PPM,
57+
&slide23_data::SLIDE_23_PPM,
58+
&slide24_data::SLIDE_24_PPM,
59+
&slide25_data::SLIDE_25_PPM,
60+
&slide26_data::SLIDE_26_PPM,
61+
&slide27_data::SLIDE_27_PPM,
62+
&slide28_data::SLIDE_28_PPM,
63+
// &slide29_data::SLIDE29,
64+
];

anasos-kernel/src/apps/presentation/data/slide0_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide10_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide11_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide12_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide13_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide14_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide15_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

anasos-kernel/src/apps/presentation/data/slide16_data.rs

Lines changed: 129609 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)