File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed
src/main/java/org/cryptomator/integrations/tray Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 44
55import java .util .Optional ;
66
7+ /**
8+ * Allows to perform OS-specific tasks when the app gets minimized to or restored from a tray icon.
9+ */
710public interface TrayIntegrationProvider {
811
12+ /**
13+ * Loads the best-suited TrayIntegrationProvider.
14+ *
15+ * @return preferred TrayIntegrationProvider (if any)
16+ * @since 1.1.0
17+ */
918 static Optional <TrayIntegrationProvider > get () {
1019 return IntegrationsLoader .load (TrayIntegrationProvider .class );
1120 }
Original file line number Diff line number Diff line change 77import java .util .List ;
88import java .util .Optional ;
99
10+ /**
11+ * Displays a tray icon and menu
12+ *
13+ * @since 1.1.0
14+ */
1015public interface TrayMenuController {
1116
1217 static Optional <TrayMenuController > get () {
1318 return IntegrationsLoader .load (TrayMenuController .class );
1419 }
1520
1621 /**
17- * Adds an icon to the system tray.
22+ * Displays an icon on the system tray.
1823 *
19- * @param iconData What image to show
20- * @param tooltip Text shown when hovering
21- * @throws IOException thrown when interacting with the given <code>iconData</code>
24+ * @param rawImageData What image to show
25+ * @param defaultAction Action to perform when interacting with the icon directly instead of its menu
26+ * @param tooltip Text shown when hovering
27+ * @throws IOException thrown when interacting with the given <code>rawImageData</code>
2228 */
23- void showTrayIcon (InputStream iconData , String tooltip ) throws IOException ;
29+ void showTrayIcon (InputStream rawImageData , Runnable defaultAction , String tooltip ) throws IOException ;
2430
2531 /**
2632 * Show the given options in the tray menu.
33+ * <p>
34+ * This method may be called multiple times, e.g. when the vault list changes.
2735 *
2836 * @param items Menu items
2937 */
30- void setTrayMenu (List <TrayMenuItem > items );
38+ void updateTrayMenu (List <TrayMenuItem > items );
3139
3240}
You can’t perform that action at this time.
0 commit comments