mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 11:59:58 -05:00
Initial community commit
This commit is contained in:
48
Src/Wasabi/api/skin/widgets/mb/mbsvc.cpp
Normal file
48
Src/Wasabi/api/skin/widgets/mb/mbsvc.cpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#include "precomp.h"
|
||||
#include <direct.h>
|
||||
#include "mbsvc.h"
|
||||
|
||||
#ifndef _WASABIRUNTIME
|
||||
|
||||
BEGIN_SERVICES(MbSvc_Svc);
|
||||
DECLARE_SERVICETSINGLE(svc_miniBrowser, MbSvc);
|
||||
END_SERVICES(MbSvc_Svc, _MbSvc_Svc);
|
||||
|
||||
#ifdef _X86_
|
||||
extern "C" { int _link_MbSvc; }
|
||||
#else
|
||||
extern "C" { int __link_MbSvc; }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
MbSvc::MbSvc()
|
||||
{
|
||||
BrowserWnd::InitializeLibrary();
|
||||
}
|
||||
|
||||
MbSvc::~MbSvc()
|
||||
{
|
||||
BrowserWnd::UninitializeLibrary();
|
||||
}
|
||||
|
||||
int MbSvc::testGuid(GUID g) {
|
||||
return (g == GUID_MINIBROWSER_ANY || g == GUID_MINIBROWSER_IEACTIVEX);
|
||||
}
|
||||
|
||||
MiniBrowser *MbSvc::createMiniBrowser() {
|
||||
BrowserWnd *w = new BrowserWnd;
|
||||
browsers.addItem(w);
|
||||
return w;
|
||||
}
|
||||
|
||||
void MbSvc::destroyMiniBrowser(MiniBrowser *b) {
|
||||
ASSERT(b != NULL);
|
||||
BrowserWnd *bw = static_cast<BrowserWnd *>(b->minibrowser_getRootWnd());
|
||||
ASSERT(bw != NULL);
|
||||
int i = browsers.searchItem(bw);
|
||||
if (i < 0) return;
|
||||
browsers.removeByPos(i);
|
||||
delete bw;
|
||||
}
|
||||
|
Reference in New Issue
Block a user