summaryrefslogtreecommitdiff
path: root/src/common/emu_window.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-08 23:18:23 -0400
committerGravatar bunnei2014-04-08 23:18:23 -0400
commit5da03e821ef281909e65c3df33f67596074ae98a (patch)
tree15f1bb0f91a88082a21e4e2e4531e1f8dee026bf /src/common/emu_window.h
parentfixed licensing and updated code style naming for arm_interface/arm_interpret... (diff)
downloadyuzu-5da03e821ef281909e65c3df33f67596074ae98a.tar.gz
yuzu-5da03e821ef281909e65c3df33f67596074ae98a.tar.xz
yuzu-5da03e821ef281909e65c3df33f67596074ae98a.zip
- removed deprecated version.h
- cleaned up window title - cleaned up emu_window_glfw/emu_window
Diffstat (limited to 'src/common/emu_window.h')
-rw-r--r--src/common/emu_window.h100
1 files changed, 40 insertions, 60 deletions
diff --git a/src/common/emu_window.h b/src/common/emu_window.h
index 7f68c9237..731784756 100644
--- a/src/common/emu_window.h
+++ b/src/common/emu_window.h
@@ -1,36 +1,10 @@
1/** 1// Copyright 2014 Citra Emulator Project
2 * Copyright (C) 2005-2012 Gekko Emulator 2// Licensed under GPLv2
3 * 3// Refer to the license.txt file included.
4 * @file emu_window.h
5 * @author Neobrain
6 * @date 2012-06-01
7 * @brief Interface for implementing an emulator window manager
8 *
9 * @section LICENSE
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of
13 * the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details at
19 * http://www.gnu.org/copyleft/gpl.html
20 *
21 * Official project repository can be found at:
22 * http://code.google.com/p/gekko-gc-emu/
23 */
24
25#ifndef CORE_EMUWINDOW_H_
26#define CORE_EMUWINDOW_H_
27 4
28#include "common/common.h" 5#pragma once
29 6
30//namespace input_common 7#include "common/common.h"
31//{
32//class KeyboardInput;
33//}
34 8
35// Abstraction class used to provide an interface between emulation code and the frontend (e.g. SDL, 9// Abstraction class used to provide an interface between emulation code and the frontend (e.g. SDL,
36// QGLWidget, GLFW, etc...) 10// QGLWidget, GLFW, etc...)
@@ -57,46 +31,52 @@ public:
57 /// Releases (dunno if this is the "right" word) the GLFW context from the caller thread 31 /// Releases (dunno if this is the "right" word) the GLFW context from the caller thread
58 virtual void DoneCurrent() = 0; 32 virtual void DoneCurrent() = 0;
59 33
60 /** 34 Config GetConfig() const {
61 * @brief Called from KeyboardInput constructor to notify EmuWindow about its presence 35 return m_config;
62 * @param controller_interface Pointer to a running KeyboardInput interface 36 }
63 */ 37
64 //void set_controller_interface(input_common::KeyboardInput* controller_interface) { 38 void SetConfig(const Config& val) {
65 // controller_interface_ = controller_interface; 39 m_config = val;
66 //} 40 }
67 //input_common::KeyboardInput* controller_interface() { return controller_interface_; }
68
69 Config config() { return config_; }
70 void set_config(Config val) { config_ = val; }
71 41
72 int client_area_width() { return client_area_width_; } 42 int GetClientAreaWidth() const {
73 void set_client_area_width(int val) { client_area_width_ = val; } 43 return m_client_area_width;
44 }
74 45
75 int client_area_height() { return client_area_height_; } 46 void SetClientAreaWidth(const int val) {
76 void set_client_area_height(int val) { client_area_height_ = val; } 47 m_client_area_width = val;
48 }
77 49
78 std::string window_title() { return window_title_; } 50 int GetClientAreaHeight() const {
79 void set_window_title(std::string val) { window_title_ = val; } 51 return m_client_area_height;
52 }
53
54 void SetClientAreaHeight(const int val) {
55 m_client_area_height = val;
56 }
57
58 std::string GetWindowTitle() {
59 return m_window_title;
60 }
61
62 void SetWindowTitle(std::string val) {
63 m_window_title = val;
64 }
80 65
81protected: 66protected:
82 EmuWindow() : client_area_width_(640), client_area_height_(480) { 67 EmuWindow() : m_client_area_width(640), m_client_area_height(480) {
83 char window_title[255]; 68 char window_title[255];
84 sprintf(window_title, "citra [%s|%s] - %s", 69 sprintf(window_title, "citra-%s", g_scm_rev_str);
85 "null-cpu", 70 m_window_title = window_title;
86 "null-renderer",
87 __DATE__);
88 window_title_ = window_title;
89 } 71 }
90 virtual ~EmuWindow() {} 72 virtual ~EmuWindow() {}
91 73
92 std::string window_title_; ///< Current window title, should be used by window impl. 74 std::string m_window_title; ///< Current window title, should be used by window impl.
93 75
94 int client_area_width_; ///< Current client width, should be set by window impl. 76 int m_client_area_width; ///< Current client width, should be set by window impl.
95 int client_area_height_; ///< Current client height, should be set by window impl. 77 int m_client_area_height; ///< Current client height, should be set by window impl.
96 78
97private: 79private:
98 Config config_; ///< Internal configuration 80 Config m_config; ///< Internal configuration
99 81
100}; 82};
101
102#endif // CORE_EMUWINDOW_H_