foobar2000 SDK  2015-08-03
core_api.h
Go to the documentation of this file.
1 #ifndef _FB2K_CORE_API_H_
2 #define _FB2K_CORE_API_H_
3 
4 namespace core_api {
5 
7  HINSTANCE get_my_instance();
9  const char * get_my_file_name();
11  const char * get_my_full_path();
13  HWND get_main_window();
17  bool assert_main_thread();
19  void ensure_main_thread();
21  bool is_main_thread();
23  bool is_shutting_down();
25  bool is_initializing();
27  const char * get_profile_path();
28 
30  inline pfc::string8 pathInProfile(const char * fileName) { pfc::string8 p( core_api::get_profile_path() ); p.add_filename( fileName ); return std::move(p); }
31 
34 
38  bool is_quiet_mode_enabled();
39 };
40 
41 #endif
void ensure_main_thread()
Triggers a bug check if the calling thread is not the main app thread.
bool is_shutting_down()
Returns whether the app is currently shutting down.
const char * get_my_full_path()
Retrieves full path of calling dll, e.g. file://c:.dll.
bool is_initializing()
Returns whether the app is currently initializing.
const char * get_profile_path()
Returns filesystem path to directory with user settings, e.g. file://c:.
const char * get_my_file_name()
Retrieves filename of calling dll, excluding extension, e.g. "foo_asdf".
bool is_quiet_mode_enabled()
Returns whether foobar2000 is currently running in quiet mode. Quiet mode bypasses all GUI features...
pfc::string8 pathInProfile(const char *fileName)
Returns a path to <file name>=""> in fb2k profile folder.
Definition: core_api.h:30
bool assert_main_thread()
Tests whether calling thread is main app thread, and shows diagnostic message in debugger output if i...
HWND get_main_window()
Retrieves main app window. WARNING: this is provided for parent of dialog windows and such only; usin...
bool is_portable_mode_enabled()
Returns whether foobar2000 has been installed in "portable" mode.
bool is_main_thread()
Returns true if calling thread is main app thread, false otherwise.
HINSTANCE get_my_instance()
Retrieves HINSTANCE of calling DLL.
bool are_services_available()
Tests whether services are available at this time. They are not available only during DLL startup or ...
void add_filename(const char *fn)
Definition: string_base.h:257