Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Wasabi/api/skin/widgets/mb/mainminibrowser.cpp
2024-09-24 14:54:57 +02:00

71 lines
1.4 KiB
C++

#include <precomp.h>
#include "mainminibrowser.h"
#include <api/script/scriptguid.h>
#include <api/script/objects/guiobject.h>
ScriptObject *MainMiniBrowser::getScriptObject()
{
return WASABI_API_MAKI->maki_getObjectAtom(L"browser.main.object");
}
void MainMiniBrowser::back() {
ScriptObject *so = getScriptObject();
if (so) {
C_Browser browser(so);
browser.back();
}
}
void MainMiniBrowser::forward(){
ScriptObject *so = getScriptObject();
if (so) {
C_Browser browser(so);
browser.forward();
}
}
void MainMiniBrowser::refresh(){
ScriptObject *so = getScriptObject();
if (so) {
C_Browser browser(so);
browser.refresh();
}
}
void MainMiniBrowser::stop(){
ScriptObject *so = getScriptObject();
if (so) {
C_Browser browser(so);
browser.stop();
}
}
void MainMiniBrowser::home(){
ScriptObject *so = getScriptObject();
if (so) {
C_Browser browser(so);
browser.home();
}
}
void MainMiniBrowser::navigateUrl(const wchar_t *url){
ScriptObject *so = getScriptObject();
if (so) {
C_Browser browser(so);
browser.navigateUrl(url);
}
}
#ifdef WASABI_COMPILE_WNDMGR
void MainMiniBrowser::popMb(){
ScriptObject *so = getScriptObject();
if (so) {
GuiObject *go = static_cast<GuiObject*>(so->vcpu_getInterface(guiObjectGuid));
if (go) {
go->guiobject_popParentLayout();
}
}
}
#endif