1313#include < libnick/app/datafilemanager.h>
1414#include < libnick/app/windowgeometry.h>
1515#include < libnick/events/event.h>
16- #include < libnick/logging/logger .h>
16+ #include < libnick/events/parameventargs .h>
1717#include < libnick/notifications/notificationsenteventargs.h>
1818#include < libnick/notifications/shellnotificationsenteventargs.h>
1919#include < libnick/taskbar/taskbaritem.h>
2020#include < libnick/update/updater.h>
2121#include " controllers/preferencesviewcontroller.h"
2222#include " models/spotlightmanager.h"
23+ #include " models/startupinformation.h"
2324#include " models/theme.h"
24- #include " models/viewmode.h"
2525
2626namespace Nickvision ::Spotlight::Shared::Controllers
2727{
@@ -46,16 +46,11 @@ namespace Nickvision::Spotlight::Shared::Controllers
4646 * @return The notification sent event
4747 */
4848 Nickvision::Events::Event<Nickvision::Notifications::NotificationSentEventArgs>& notificationSent ();
49- /* *
50- * @brief Gets the event for when a shell notification is sent.
51- * @return The shell notification sent event
52- */
53- Nickvision::Events::Event<Nickvision::Notifications::ShellNotificationSentEventArgs>& shellNotificationSent ();
5449 /* *
5550 * @brief Gets the event for when images are synced.
5651 * @return The images synced event
5752 */
58- Nickvision::Events::Event<Nickvision::Events::EventArgs >& imagesSynced ();
53+ Nickvision::Events::Event<Nickvision::Events::ParamEventArgs<std::vector<std::filesystem::path>> >& imagesSynced ();
5954 /* *
6055 * @brief Gets the AppInfo object for the application
6156 * @return The current AppInfo object
@@ -66,22 +61,23 @@ namespace Nickvision::Spotlight::Shared::Controllers
6661 * @return The preferred theme
6762 */
6863 Models::Theme getTheme ();
69- /* *
70- * @brief Gets the view mode for the application.
71- * @return The view mode
72- */
73- Models::ViewMode getViewMode ();
7464 /* *
7565 * @brief Gets the debugging information for the application.
7666 * @param extraInformation Extra, ui-specific, information to include in the debug info statement
7767 * @return The application's debug information
7868 */
7969 std::string getDebugInformation (const std::string& extraInformation = " " ) const ;
8070 /* *
81- * @brief Gets the list of paths to synced spotlight images.
82- * @return The list of paths to synced spotlight images
71+ * @brief Gets the number of spotlight images synced.
72+ * @return The number of spotlight images synced
73+ */
74+ size_t getSpotlightImageCount () const ;
75+ /* *
76+ * @brief Gets the path of a spotlight image.
77+ * @param index The index of the image
78+ * @return The path of the spotlight image
8379 */
84- const std::vector<std:: filesystem::path>& getSpotlightImages ( ) const ;
80+ const std::filesystem::path& getSpotlightImagePath ( int index ) const ;
8581 /* *
8682 * @brief Gets whether or not the application can be shut down.
8783 * @return True if can shut down, else false
@@ -97,13 +93,12 @@ namespace Nickvision::Spotlight::Shared::Controllers
9793 * @brief Will only have an effect on the first time called.
9894 * @return The WindowGeometry to use for the application window at startup
9995 */
100- Nickvision::App::WindowGeometry startup (HWND hwnd);
96+ const Models::StartupInformation& startup (HWND hwnd);
10197 /* *
10298 * @brief Shuts down the application.
10399 * @param geometry The window geometry to save
104- * @param viewMode The view mode to save
105100 */
106- void shutdown (const Nickvision::App::WindowGeometry& geometry, Models::ViewMode viewMode );
101+ void shutdown (const Nickvision::App::WindowGeometry& geometry);
107102 /* *
108103 * @brief Checks for an application update and sends a notification if one is available.
109104 */
@@ -120,12 +115,9 @@ namespace Nickvision::Spotlight::Shared::Controllers
120115 */
121116 void connectTaskbar (HWND hwnd);
122117 /* *
123- * @brief Logs a system message.
124- * @param level The severity level of the message
125- * @param message The message to log
126- * @param source The source location of the log message
118+ * @brief Clears and syncs the spotlight images.
127119 */
128- void log (Logging::LogLevel level, const std::string& message, const std::source_location& source = std::source_location::current() );
120+ void clearAndSync ( );
129121 /* *
130122 * @brief Sets a spotlight image as the desktop background.
131123 * @param index The index of the image to set as the desktop background
@@ -148,13 +140,10 @@ namespace Nickvision::Spotlight::Shared::Controllers
148140 std::vector<std::string> m_args;
149141 Nickvision::App::AppInfo m_appInfo;
150142 Nickvision::App::DataFileManager m_dataFileManager;
151- Nickvision::Logging::Logger m_logger;
152143 std::shared_ptr<Nickvision::Update::Updater> m_updater;
153144 Nickvision::Taskbar::TaskbarItem m_taskbar;
154- Nickvision::Events::Event<Nickvision::Notifications::NotificationSentEventArgs> m_notificationSent;
155- Nickvision::Events::Event<Nickvision::Notifications::ShellNotificationSentEventArgs> m_shellNotificationSent;
156145 Models::SpotlightManager m_spotlightManager;
157- Nickvision::Events::Event<Nickvision::Events::EventArgs > m_imagesSynced;
146+ Nickvision::Events::Event<Nickvision::Events::ParamEventArgs<std::vector<std::filesystem::path>> > m_imagesSynced;
158147 };
159148}
160149
0 commit comments