1#![allow(unused)]
2
3use crate::{
4 Action, AnyWindowHandle, BackgroundExecutor, ClipboardItem, CursorStyle, DisplayId,
5 Keymap, Menu, PathPromptOptions, Platform, PlatformDisplay, PlatformInput,
6 PlatformTextSystem, PlatformWindow, Result, SemanticVersion, Task, WindowOptions,
7};
8
9use futures::channel::oneshot;
10use parking_lot::Mutex;
11
12use std::{
13 path::{Path, PathBuf},
14 rc::Rc,
15 sync::Arc,
16 time::Duration,
17};
18use time::UtcOffset;
19
20
21pub(crate) struct LinuxPlatform(Mutex<LinuxPlatformState>);
22
23pub(crate) struct LinuxPlatformState {
24}
25
26impl Default for LinuxPlatform {
27 fn default() -> Self {
28 Self::new()
29 }
30}
31
32impl LinuxPlatform {
33 pub(crate) fn new() -> Self {
34 Self(Mutex::new(LinuxPlatformState {
35 }))
36 }
37}
38
39impl Platform for LinuxPlatform {
40 fn background_executor(&self) -> BackgroundExecutor {
41 unimplemented!()
42 }
43
44 fn foreground_executor(&self) -> crate::ForegroundExecutor {
45 unimplemented!()
46 }
47
48 fn text_system(&self) -> Arc<dyn PlatformTextSystem> {
49 unimplemented!()
50 }
51
52 fn run(&self, on_finish_launching: Box<dyn FnOnce()>) {
53 unimplemented!()
54 }
55
56 fn quit(&self) {
57 unimplemented!()
58 }
59
60 fn restart(&self) {
61 unimplemented!()
62 }
63
64 fn activate(&self, ignoring_other_apps: bool) {
65 unimplemented!()
66 }
67
68 fn hide(&self) {
69 unimplemented!()
70 }
71
72 fn hide_other_apps(&self) {
73 unimplemented!()
74 }
75
76 fn unhide_other_apps(&self) {
77 unimplemented!()
78 }
79
80 fn displays(&self) -> Vec<Rc<dyn PlatformDisplay>> {
81 unimplemented!()
82 }
83
84 fn display(&self, id: DisplayId) -> Option<Rc<dyn PlatformDisplay>> {
85 unimplemented!()
86 }
87
88 fn active_window(&self) -> Option<AnyWindowHandle> {
89 unimplemented!()
90 }
91
92 fn open_window(
93 &self,
94 handle: AnyWindowHandle,
95 options: WindowOptions,
96 ) -> Box<dyn PlatformWindow> {
97 unimplemented!()
98 }
99
100 fn set_display_link_output_callback(
101 &self,
102 display_id: DisplayId,
103 callback: Box<dyn FnMut() + Send>,
104 ) {
105 unimplemented!()
106 }
107
108 fn start_display_link(&self, display_id: DisplayId) {
109 unimplemented!()
110 }
111
112 fn stop_display_link(&self, display_id: DisplayId) {
113 unimplemented!()
114 }
115
116 fn open_url(&self, url: &str) {
117 unimplemented!()
118 }
119
120 fn on_open_urls(&self, callback: Box<dyn FnMut(Vec<String>)>) {
121 unimplemented!()
122 }
123
124 fn prompt_for_paths(
125 &self,
126 options: PathPromptOptions,
127 ) -> oneshot::Receiver<Option<Vec<PathBuf>>> {
128 unimplemented!()
129 }
130
131 fn prompt_for_new_path(&self, directory: &Path) -> oneshot::Receiver<Option<PathBuf>> {
132 unimplemented!()
133 }
134
135 fn reveal_path(&self, path: &Path) {
136 unimplemented!()
137 }
138
139 fn on_become_active(&self, callback: Box<dyn FnMut()>) {
140 unimplemented!()
141 }
142
143 fn on_resign_active(&self, callback: Box<dyn FnMut()>) {
144 unimplemented!()
145 }
146
147 fn on_quit(&self, callback: Box<dyn FnMut()>) {
148 unimplemented!()
149 }
150
151 fn on_reopen(&self, callback: Box<dyn FnMut()>) {
152 unimplemented!()
153 }
154
155 fn on_event(&self, callback: Box<dyn FnMut(PlatformInput) -> bool>) {
156 unimplemented!()
157 }
158
159 fn on_app_menu_action(&self, callback: Box<dyn FnMut(&dyn Action)>) {
160 unimplemented!()
161 }
162
163 fn on_will_open_app_menu(&self, callback: Box<dyn FnMut()>) {
164 unimplemented!()
165 }
166
167 fn on_validate_app_menu_command(&self, callback: Box<dyn FnMut(&dyn Action) -> bool>) {
168 unimplemented!()
169 }
170
171 fn os_name(&self) -> &'static str {
172 "Linux"
173 }
174
175 fn double_click_interval(&self) -> Duration {
176 unimplemented!()
177 }
178
179 fn os_version(&self) -> Result<SemanticVersion> {
180 unimplemented!()
181 }
182
183 fn app_version(&self) -> Result<SemanticVersion> {
184 unimplemented!()
185 }
186
187 fn app_path(&self) -> Result<PathBuf> {
188 unimplemented!()
189 }
190
191 fn set_menus(&self, menus: Vec<Menu>, keymap: &Keymap) {
192 unimplemented!()
193 }
194
195 fn local_timezone(&self) -> UtcOffset {
196 unimplemented!()
197 }
198
199 fn path_for_auxiliary_executable(&self, name: &str) -> Result<PathBuf> {
200 unimplemented!()
201 }
202
203 fn set_cursor_style(&self, style: CursorStyle) {
204 unimplemented!()
205 }
206
207 fn should_auto_hide_scrollbars(&self) -> bool {
208 unimplemented!()
209 }
210
211 fn write_to_clipboard(&self, item: ClipboardItem) {
212 unimplemented!()
213 }
214
215 fn read_from_clipboard(&self) -> Option<ClipboardItem> {
216 unimplemented!()
217 }
218
219 fn write_credentials(&self, url: &str, username: &str, password: &[u8]) -> Task<Result<()>> {
220 unimplemented!()
221 }
222
223 fn read_credentials(&self, url: &str) -> Task<Result<Option<(String, Vec<u8>)>>> {
224 unimplemented!()
225 }
226
227 fn delete_credentials(&self, url: &str) -> Task<Result<()>> {
228 unimplemented!()
229 }
230}
231
232#[cfg(test)]
233mod tests {
234 use crate::ClipboardItem;
235
236 use super::*;
237
238 fn build_platform() -> LinuxPlatform {
239 let platform = LinuxPlatform::new();
240 platform
241 }
242}