2014-10-18 15:07:17 +00:00
|
|
|
// Copyright 2014 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2014-10-18 15:07:17 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#include <cstring>
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
#include <QApplication>
|
|
|
|
#include <QResizeEvent>
|
|
|
|
|
2014-10-18 15:07:17 +00:00
|
|
|
#include "Common/MsgHandler.h"
|
|
|
|
#include "Core/Host.h"
|
|
|
|
|
2015-09-12 18:00:08 +00:00
|
|
|
#include "DolphinQt/Host.h"
|
2014-11-02 18:53:48 +00:00
|
|
|
#include "DolphinQt/MainWindow.h"
|
|
|
|
|
2015-09-12 18:00:08 +00:00
|
|
|
HostTitleEvent::HostTitleEvent(const std::string& title)
|
|
|
|
: QEvent((QEvent::Type)HostEvent::TitleEvent),
|
|
|
|
m_title(title)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-10-18 15:07:17 +00:00
|
|
|
void Host_Message(int id)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_UpdateMainFrame()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
2014-11-02 18:53:48 +00:00
|
|
|
// TODO
|
2014-10-18 15:07:17 +00:00
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_UpdateTitle(const std::string& title)
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
2015-09-12 18:00:08 +00:00
|
|
|
qApp->postEvent(g_main_window, new HostTitleEvent(title));
|
2014-10-18 15:07:17 +00:00
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void* Host_GetRenderHandle()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
2014-11-02 18:53:48 +00:00
|
|
|
return (void*)(g_main_window->GetRenderWidget()->winId());
|
2014-10-18 15:07:17 +00:00
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_RequestRenderWindowSize(int w, int h)
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
2014-11-02 18:53:48 +00:00
|
|
|
DRenderWidget* render_widget = g_main_window->GetRenderWidget();
|
|
|
|
qApp->postEvent(render_widget, new QResizeEvent(QSize(w, h), render_widget->size()));
|
2014-10-18 15:07:17 +00:00
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
bool Host_RendererHasFocus()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
2014-11-02 18:53:48 +00:00
|
|
|
return g_main_window->RenderWidgetHasFocus();
|
2014-10-18 15:07:17 +00:00
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
bool Host_UIHasFocus()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
2014-11-02 18:53:48 +00:00
|
|
|
return g_main_window->isActiveWindow();
|
2014-10-18 15:07:17 +00:00
|
|
|
}
|
|
|
|
|
2015-01-04 16:09:56 +00:00
|
|
|
bool Host_RendererIsFullscreen()
|
|
|
|
{
|
|
|
|
return false; // TODO
|
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_RequestFullscreen(bool enable)
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_NotifyMapLoaded()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_UpdateDisasmDialog()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_SetStartupDebuggingParameters()
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2014-11-02 18:53:48 +00:00
|
|
|
void Host_SetWiiMoteConnectionState(int state)
|
2014-10-18 15:07:17 +00:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host_ConnectWiimote(int wm_idx, bool connect)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host_ShowVideoConfig(void* parent, const std::string& backend_name,
|
|
|
|
const std::string& config_name)
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
void Host_RefreshDSPDebuggerWindow()
|
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
}
|