2015-11-27 01:33:07 -07:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2017-07-04 08:58:27 -06:00
|
|
|
class QTimer;
|
|
|
|
|
2015-11-27 01:33:07 -07:00
|
|
|
class RenderWidget final : public QWidget
|
|
|
|
{
|
2016-06-24 02:43:46 -06:00
|
|
|
Q_OBJECT
|
2015-11-27 01:33:07 -07:00
|
|
|
|
|
|
|
public:
|
2016-06-24 02:43:46 -06:00
|
|
|
explicit RenderWidget(QWidget* parent = nullptr);
|
2015-11-27 01:33:07 -07:00
|
|
|
|
2017-07-13 13:55:50 -06:00
|
|
|
bool event(QEvent* event) override;
|
2015-11-27 01:33:07 -07:00
|
|
|
|
|
|
|
signals:
|
2016-06-24 02:43:46 -06:00
|
|
|
void EscapePressed();
|
|
|
|
void Closed();
|
|
|
|
void HandleChanged(void* handle);
|
|
|
|
void StateChanged(bool fullscreen);
|
2018-01-20 13:00:28 -07:00
|
|
|
void SizeChanged();
|
2017-06-01 00:49:21 -06:00
|
|
|
|
|
|
|
private:
|
2017-07-04 08:58:27 -06:00
|
|
|
void HandleCursorTimer();
|
2017-06-01 00:49:21 -06:00
|
|
|
void OnHideCursorChanged();
|
2017-07-04 08:58:27 -06:00
|
|
|
|
|
|
|
static constexpr int MOUSE_HIDE_DELAY = 3000;
|
|
|
|
QTimer* m_mouse_timer;
|
2015-11-27 01:33:07 -07:00
|
|
|
};
|