diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/api/wnd/wndclass/rootwndholder.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Wasabi/api/wnd/wndclass/rootwndholder.h')
-rw-r--r-- | Src/Wasabi/api/wnd/wndclass/rootwndholder.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Src/Wasabi/api/wnd/wndclass/rootwndholder.h b/Src/Wasabi/api/wnd/wndclass/rootwndholder.h new file mode 100644 index 00000000..6c718ce5 --- /dev/null +++ b/Src/Wasabi/api/wnd/wndclass/rootwndholder.h @@ -0,0 +1,41 @@ +#ifndef __ROOTWNDHOLD_H +#define __ROOTWNDHOLD_H + +#include <api/wnd/virtualwnd.h> + +/** + A simple wnd that holds another window. Initializes it if needed, but DOES not delete it (and for a good reason, this is a ifc_window), + so your inheritor has to call whoever is needed to destroy the wnd +*/ + +#define ROOTWNDHOLDER_PARENT VirtualWnd + +class RootWndHolder : public ROOTWNDHOLDER_PARENT +{ + public: + RootWndHolder(); + virtual ~RootWndHolder(); + + // override this + virtual ifc_window *rootwndholder_getRootWnd(); + virtual void rootwndholder_getRect(RECT *r); + virtual void rootwndholder_setRootWnd(ifc_window *w); + + // BaseWnd + virtual int onInit(); + virtual int onResize(); +// virtual void onSetVisible(int v); + virtual int wantRenderBaseTexture() { return 0; } + virtual int onPaint(Canvas *c); + virtual int onActivate(); + virtual int onDeactivate(); + virtual int getPreferences(int what); + virtual int onAction(const wchar_t *action, const wchar_t *param=NULL, int x=-1, int y=-1, intptr_t p1=0, intptr_t p2=0, void *data=NULL, size_t datalen=0, ifc_window *source=NULL); + virtual int childNotify(ifc_window *child, int msg, intptr_t param1=0, intptr_t param2=0); + + private: + void checkInit(ifc_window *w); + ifc_window *privptr; +}; + +#endif
\ No newline at end of file |