Skip to content

Commit bfb34c9

Browse files
committed
build on windows
1 parent e31fb6d commit bfb34c9

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

paperjet/src/print/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ mod util;
88

99
#[cfg(unix)]
1010
pub mod unix;
11+
12+
#[cfg(windows)]
13+
pub mod windows;

paperjet/src/print/util/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(unix)]
2+
13
use std::{borrow, ffi};
24

35
/// A mutable pointer along with a size (useful for dynamic arrays).

paperjet/src/print/windows/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod native;
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
use std::io::Read;
2+
3+
use crate::error::PrintError;
4+
use crate::options::PrintOptions;
5+
use crate::{CrossPlatformApi, PlatformSpecificApi, Printer};
6+
7+
impl CrossPlatformApi for PlatformSpecificApi {
8+
fn get_printers() -> Vec<Printer> {
9+
todo!("Not supported on Windows yet")
10+
}
11+
12+
fn get_printer(_name: &str) -> Option<Printer> {
13+
todo!("Not supported on Windows yet")
14+
}
15+
16+
fn get_default_printer() -> Option<Printer> {
17+
todo!("Not supported on Windows yet")
18+
}
19+
20+
fn print<I, R>(_readers: I, _printer: Printer, _options: PrintOptions) -> Result<(), PrintError>
21+
where
22+
I: IntoIterator<Item = R>,
23+
R: Read,
24+
{
25+
todo!("Not supported on Windows yet")
26+
}
27+
}

0 commit comments

Comments
 (0)