citra-emu
/
citra-canary
Archived
1
0
Fork 0
This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
citra-canary/src/citra/emu_window/emu_window_glfw.h

53 lines
1.5 KiB
C
Raw Normal View History

2014-04-09 00:25:53 +00:00
// Copyright 2014 Citra Emulator Project
2014-12-17 05:38:14 +00:00
// Licensed under GPLv2 or any later version
2014-04-09 00:25:53 +00:00
// Refer to the license.txt file included.
2013-09-05 02:10:47 +00:00
#pragma once
2013-09-05 02:10:47 +00:00
#include "common/emu_window.h"
2013-09-05 02:10:47 +00:00
struct GLFWwindow;
2013-09-05 02:10:47 +00:00
class EmuWindow_GLFW : public EmuWindow {
public:
EmuWindow_GLFW();
~EmuWindow_GLFW();
/// Swap buffers to display the next frame
void SwapBuffers() override;
2013-09-05 02:10:47 +00:00
/// Polls window events
void PollEvents() override;
2013-09-05 02:10:47 +00:00
/// Makes the graphics context current for the caller thread
void MakeCurrent() override;
2013-09-05 02:10:47 +00:00
/// Releases (dunno if this is the "right" word) the GLFW context from the caller thread
void DoneCurrent() override;
2013-09-05 02:10:47 +00:00
static void OnKeyEvent(GLFWwindow* win, int key, int scancode, int action, int mods);
2013-09-05 02:10:47 +00:00
static void OnMouseButtonEvent(GLFWwindow* window, int button, int action, int mods);
static void OnCursorPosEvent(GLFWwindow* window, double x, double y);
/// Whether the window is still open, and a close request hasn't yet been sent
const bool IsOpen();
static void OnClientAreaResizeEvent(GLFWwindow* win, int width, int height);
static void OnFramebufferResizeEvent(GLFWwindow* win, int width, int height);
void ReloadSetKeymaps() override;
2013-09-05 02:10:47 +00:00
private:
void OnMinimalClientAreaChangeRequest(const std::pair<unsigned,unsigned>& minimal_size) override;
static EmuWindow_GLFW* GetEmuWindow(GLFWwindow* win);
GLFWwindow* m_render_window; ///< Internal GLFW render window
/// Device id of keyboard for use with KeyMap
int keyboard_id;
2013-09-05 02:10:47 +00:00
};