11 typedef BOOL (WINAPI * HookProc_t)(HWND wnd,UINT msg,WPARAM wp,LPARAM lp,LRESULT * ret);
14 virtual const char * get_name()=0;
16 virtual HWND init(HookProc_t hook)=0;
18 virtual void shutdown()=0;
20 virtual void activate()=0;
22 virtual void hide()=0;
24 virtual bool is_visible() = 0;
26 virtual GUID get_guid() = 0;
29 virtual void override_statusbar_text(
const char * p_text) = 0;
31 virtual void revert_statusbar_text() = 0;
34 virtual void show_now_playing() = 0;
51 virtual void override_text(
const char * p_message) = 0;
53 virtual void revert_text() = 0;
63 virtual bool is_visible()=0;
65 virtual void activate()=0;
67 virtual void hide()=0;
69 virtual HICON get_main_icon()=0;
71 virtual HICON load_main_icon(
unsigned width,
unsigned height) = 0;
74 virtual void show_preferences(
const GUID & p_page) = 0;
81 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(
ui_control);
89 virtual bool on_drop(interface
IDataObject * pDataObject) = 0;
92 virtual bool is_accepted_type(interface
IDataObject * pDataObject, DWORD * p_effect)=0;
95 static bool g_on_drop(interface
IDataObject * pDataObject);
97 static bool g_is_accepted_type(interface
IDataObject * pDataObject, DWORD * p_effect);
130 virtual void set_playlist_selection_tracking() = 0;
135 virtual void set_playlist_tracking() = 0;
153 virtual ui_selection_holder::ptr acquire() = 0;
156 virtual GUID get_selection_type() = 0;
165 enum { flag_no_now_playing = 1 };
186 if (state != m_active) {
189 if (state) api->register_callback(
this);
190 else api->unregister_callback(
this);
204 template<
unsigned flags>
208 ui_selection_flags = flags
214 if (state != m_active) {
217 if (state) api->register_callback(
this, flags);
218 else api->unregister_callback(
this);
typedef BOOL(WINAPI *pPowerSetRequest_t)(__in HANDLE PowerRequest
void ui_selection_callback_activate(bool state=true)
void on_selection_changed(metadb_handle_list_cref p_selection)
Interface class allowing you to override UI statusbar text. There may be multiple callers trying to o...
Entrypoint service for user interface modules. Implement when registering an UI module. Do not call existing implementations; only core enumerates / dispatches calls. To control UI behaviors from other components, use ui_control API. Use user_interface_factory_t<> to register, e.g static user_interface_factory_t<myclass> g_myclass_factory;.
void on_selection_changed(metadb_handle_list_cref p_selection)
ui_selection_callback_impl_base(bool activate=true)
Write interface and reference counter for the shared selection. The ui_selection_manager stores the s...
void ui_selection_callback_activate(bool state=true)
ui_selection_callback_impl_base_ex(bool activate=true)
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
Serivce providing various UI-related commands. Implemented by core; do not reimplement. Instantiation: use static_api_ptr_t<ui_control>.
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
ui_selection_callback implementation helper with autoregistration - do not instantiate statically ...
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
~ui_selection_callback_impl_base_ex()
~ui_selection_callback_impl_base()
Service called from the UI when some object is dropped into the UI. Usable for modifying drag&drop be...