foobar2000 SDK
2015-08-03
|
#include <threaded_process.h>
Public Types | |
enum | { flag_show_abort = 1, flag_show_minimize = 1 << 1, flag_show_progress = 1 << 2, flag_show_progress_dual = 1 << 3, flag_show_item = 1 << 4, flag_show_pause = 1 << 5, flag_high_priority = 1 << 6, flag_show_delayed = 1 << 7, flag_no_focus = 1 << 8 } |
Public Types inherited from service_base | |
typedef service_base | t_interface |
Public Member Functions | |
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (threaded_process) | |
virtual bool | run_modal (service_ptr_t< threaded_process_callback > p_callback, unsigned p_flags, HWND p_parent, const char *p_title, t_size p_title_len=~0)=0 |
virtual bool | run_modeless (service_ptr_t< threaded_process_callback > p_callback, unsigned p_flags, HWND p_parent, const char *p_title, t_size p_title_len=~0)=0 |
Public Member Functions inherited from service_base | |
template<typename outPtr_t > | |
bool | cast (outPtr_t &outPtr) |
virtual int | service_add_ref ()=0 throw () |
virtual bool | service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid) |
template<class T > | |
bool | service_query_t (service_ptr_t< T > &p_out) |
virtual int | service_release ()=0 throw () |
Static Public Member Functions | |
static bool | g_query_preventStandby () |
static bool | g_run_modal (service_ptr_t< threaded_process_callback > p_callback, unsigned p_flags, HWND p_parent, const char *p_title, t_size p_title_len=~0) |
static bool | g_run_modeless (service_ptr_t< threaded_process_callback > p_callback, unsigned p_flags, HWND p_parent, const char *p_title, t_size p_title_len=~0) |
Additional Inherited Members | |
Protected Member Functions inherited from service_base | |
service_base () | |
~service_base () | |
The threaded_process API allows you to easily put timeconsuming tasks in worker threads, with progress dialog giving nice feedback to the user.
Thanks to this API you can perform such tasks with no user interface related programming at all.
Definition at line 58 of file threaded_process.h.
anonymous enum |
Definition at line 60 of file threaded_process.h.
threaded_process::FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT | ( | threaded_process | ) |
|
static |
Queries user settings; returns whether various timeconsuming tasks should be blocking machine standby.
Definition at line 38 of file threaded_process.cpp.
|
static |
Helper invoking run_modal().
Definition at line 28 of file threaded_process.cpp.
|
static |
Helper invoking run_modeless().
Definition at line 33 of file threaded_process.cpp.
|
pure virtual |
Runs a synchronous threaded_process operation - the function does not return until the operation has completed, though the app UI is not frozen and the operation is abortable.
This API is obsolete and should not be used. Please use run_modeless() instead if possible.
p_callback | Interface to your threaded_process client. |
p_flags | Flags describing requested dialog functionality. See threaded_process::flag_* constants. |
p_parent | Parent window for the progress dialog - typically core_api::get_main_window(). |
p_title | Initial title of the dialog. |
|
pure virtual |
Runs an asynchronous threaded_process operation.
p_callback | Interface to your threaded_process client. |
p_flags | Flags describing requested dialog functionality. See threaded_process::flag_* constants. |
p_parent | Parent window for the progress dialog - typically core_api::get_main_window(). |
p_title | Initial title of the dialog. |