| ... | ... |
@@ -1,4 +1,57 @@ |
| 1 |
-# RUSTAPP |
|
| 1 |
+# Rust App |
|
| 2 |
+ |
|
| 3 |
+This is a base application to integrate with Rust and Gtk. |
|
| 4 |
+ |
|
| 5 |
+It integrates a tray icon and some actions, with a main window which is only hiding rather than closing. |
|
| 6 |
+ |
|
| 7 |
+The window will be un-hidden by clicking the Main menu item in the tray icon. This should also bring the window on top of the other windows. |
|
| 8 |
+ |
|
| 9 |
+The icon (emoticon) is present on the taskbar and also on the tray icon. However due to the limitation of the tray icon, both a ico and png file are necessary. |
|
| 10 |
+ |
|
| 11 |
+The build script (build.rs) is copying the icon to the destination directory. |
|
| 12 |
+ |
|
| 13 |
+The build is not kept with the files but is set in a separate directory. |
|
| 14 |
+ |
|
| 15 |
+``` |
|
| 16 |
+../../../Projects/RustBuild/rustapp |
|
| 17 |
+``` |
|
| 18 |
+ |
|
| 19 |
+This path is kept in .cargo/config.toml |
|
| 20 |
+ |
|
| 21 |
+The build script is also using the same destination directory. This script needs to be changed to use the same destination. |
|
| 22 |
+ |
|
| 23 |
+### To run: |
|
| 24 |
+ |
|
| 25 |
+A few dependencies needs to be used: |
|
| 26 |
+ |
|
| 27 |
+- The trayicon widget |
|
| 28 |
+ |
|
| 29 |
+To build the project |
|
| 30 |
+ |
|
| 31 |
+ |
|
| 32 |
+``` |
|
| 33 |
+cargo build |
|
| 34 |
+``` |
|
| 35 |
+ |
|
| 36 |
+To run the project |
|
| 37 |
+ |
|
| 38 |
+``` |
|
| 39 |
+cargo run |
|
| 40 |
+``` |
|
| 41 |
+ |
|
| 42 |
+ |
|
| 43 |
+### Note: |
|
| 44 |
+ |
|
| 45 |
+- The keybinder is not implemented in the GTK bindings |
|
| 46 |
+ |
|
| 47 |
+- This project is only targetted at GTK and was only tested on Linux. |
|
| 48 |
+ |
|
| 49 |
+ |
|
| 50 |
+### References: |
|
| 51 |
+ |
|
| 52 |
+- https://docs.rs/appindicator3/latest/src/simple_client/simple_client.rs.html#61 |
|
| 53 |
+ |
|
| 54 |
+- https://github.com/gtk-rs/gtk3-rs/blob/master/examples/multi_window/main.rs |
|
| 55 |
+ |
|
| 2 | 56 |
|
| 3 |
-This is a base application to integrate with Rust and Gtk |
|
| 4 | 57 |
|