diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/api/wndmgr/guistatuscb.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Wasabi/api/wndmgr/guistatuscb.h')
-rw-r--r-- | Src/Wasabi/api/wndmgr/guistatuscb.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/Src/Wasabi/api/wndmgr/guistatuscb.h b/Src/Wasabi/api/wndmgr/guistatuscb.h new file mode 100644 index 00000000..f35a4d9f --- /dev/null +++ b/Src/Wasabi/api/wndmgr/guistatuscb.h @@ -0,0 +1,83 @@ +#ifndef _GUISTATUSCB_H +#define _GUISTATUSCB_H + +#include <bfc/dispatch.h> + +class AppCmds; +class ifc_dependent; + +class GuiStatusCallback : public Dispatchable { + public: + void onSetStatusText(const wchar_t *text, int overlay); + void onAddAppCmds(AppCmds *commands); + void onRemoveAppCmds(AppCmds *commands); + void pushCompleted(int max=100); + void incCompleted(int add=1); + void setCompleted(int pos); + void popCompleted(); + + api_dependent *status_getDependencyPtr(); + enum { + STATUS_ONSETTEXT = 101, + STATUS_GETDEP = 200, + STATUS_ADDCTXTCMDS = 300, + STATUS_REMCTXTCMDS = 400, + STATUS_PUSHCOMPLETED = 500, + STATUS_INCCOMPLETED = 600, + STATUS_SETCOMPLETED = 700, + STATUS_POPCOMPLETED = 800, + }; +}; + +inline void GuiStatusCallback ::onSetStatusText(const wchar_t *text, int overlay) { + _voidcall(STATUS_ONSETTEXT, text, overlay); +} + +inline api_dependent *GuiStatusCallback ::status_getDependencyPtr() { + return _call(STATUS_GETDEP, (api_dependent *)NULL); +} + +inline void GuiStatusCallback ::onAddAppCmds(AppCmds *commands) { + _voidcall(STATUS_ADDCTXTCMDS, commands); +} + +inline void GuiStatusCallback ::onRemoveAppCmds(AppCmds *commands) { + _voidcall(STATUS_REMCTXTCMDS, commands); +} + +inline +void GuiStatusCallback::pushCompleted(int max) { + _voidcall(STATUS_PUSHCOMPLETED, max); +} + +inline +void GuiStatusCallback::incCompleted(int add) { + _voidcall(STATUS_INCCOMPLETED, add); +} + +inline +void GuiStatusCallback::setCompleted(int pos) { + _voidcall(STATUS_SETCOMPLETED, pos); +} + +inline +void GuiStatusCallback::popCompleted() { + _voidcall(STATUS_POPCOMPLETED); +} + +class GuiStatusCallbackI : public GuiStatusCallback { + public: + virtual void onSetStatusText(const wchar_t *text, int overlay)=0; + virtual api_dependent *status_getDependencyPtr()=0; + virtual void onAddAppCmds(AppCmds *commands)=0; + virtual void onRemoveAppCmds(AppCmds *commands)=0; + virtual void pushCompleted(int max=100)=0; + virtual void incCompleted(int add=1)=0; + virtual void setCompleted(int pos)=0; + virtual void popCompleted()=0; + + protected: + RECVS_DISPATCH; +}; + +#endif |