Code cleanup: moving poly/ into xenia/base/

This commit is contained in:
Ben Vanik
2015-05-02 03:42:51 -07:00
parent 99816056be
commit e3220f7ae6
223 changed files with 1758 additions and 1881 deletions

View File

@@ -9,7 +9,7 @@
#include "xenia/ui/control.h"
#include "poly/assert.h"
#include "xenia/base/assert.h"
namespace xe {
namespace ui {

View File

@@ -13,7 +13,7 @@
#include <memory>
#include <vector>
#include "poly/delegate.h"
#include "xenia/base/delegate.h"
#include "xenia/ui/ui_event.h"
namespace xe {
@@ -65,24 +65,24 @@ class Control {
virtual void set_focus(bool value) { has_focus_ = value; }
public:
poly::Delegate<UIEvent> on_resize;
poly::Delegate<UIEvent> on_layout;
poly::Delegate<UIEvent> on_paint;
Delegate<UIEvent> on_resize;
Delegate<UIEvent> on_layout;
Delegate<UIEvent> on_paint;
poly::Delegate<UIEvent> on_visible;
poly::Delegate<UIEvent> on_hidden;
Delegate<UIEvent> on_visible;
Delegate<UIEvent> on_hidden;
poly::Delegate<UIEvent> on_got_focus;
poly::Delegate<UIEvent> on_lost_focus;
Delegate<UIEvent> on_got_focus;
Delegate<UIEvent> on_lost_focus;
poly::Delegate<KeyEvent> on_key_down;
poly::Delegate<KeyEvent> on_key_up;
poly::Delegate<KeyEvent> on_key_char;
Delegate<KeyEvent> on_key_down;
Delegate<KeyEvent> on_key_up;
Delegate<KeyEvent> on_key_char;
poly::Delegate<MouseEvent> on_mouse_down;
poly::Delegate<MouseEvent> on_mouse_move;
poly::Delegate<MouseEvent> on_mouse_up;
poly::Delegate<MouseEvent> on_mouse_wheel;
Delegate<MouseEvent> on_mouse_down;
Delegate<MouseEvent> on_mouse_move;
Delegate<MouseEvent> on_mouse_up;
Delegate<MouseEvent> on_mouse_wheel;
protected:
explicit Control(uint32_t flags);

View File

@@ -9,10 +9,10 @@
#include "xenia/ui/main_window.h"
#include "poly/threading.h"
#include "xenia/base/logging.h"
#include "xenia/base/threading.h"
#include "xenia/gpu/graphics_system.h"
#include "xenia/emulator.h"
#include "xenia/logging.h"
#include "xenia/profiling.h"
namespace xe {
@@ -24,10 +24,10 @@ MainWindow::MainWindow(Emulator* emulator)
MainWindow::~MainWindow() = default;
void MainWindow::Start() {
poly::threading::Fence fence;
xe::threading::Fence fence;
loop_.Post([&]() {
poly::threading::set_name("Win32 Loop");
xe::threading::set_name("Win32 Loop");
xe::Profiler::ThreadEnter("Win32 Loop");
if (!Initialize()) {

View File

@@ -13,7 +13,7 @@
#include <memory>
#include <vector>
#include "poly/delegate.h"
#include "xenia/base/delegate.h"
#include "xenia/ui/ui_event.h"
namespace xe {
@@ -39,7 +39,7 @@ class MenuItem {
void AddChild(MenuItemPtr child_item);
void RemoveChild(MenuItem* child_item);
poly::Delegate<UIEvent> on_selected;
Delegate<UIEvent> on_selected;
protected:
MenuItem(Type type);

View File

@@ -9,7 +9,7 @@
#include "xenia/ui/win32/win32_loop.h"
#include "poly/assert.h"
#include "xenia/base/assert.h"
namespace xe {
namespace ui {
@@ -28,9 +28,9 @@ class PostedFn {
};
Win32Loop::Win32Loop() : thread_id_(0) {
poly::threading::Fence init_fence;
xe::threading::Fence init_fence;
thread_ = std::thread([&]() {
poly::threading::set_name("Win32 Loop");
xe::threading::set_name("Win32 Loop");
thread_id_ = GetCurrentThreadId();
// Make a Win32 call to enable the thread queue.

View File

@@ -18,7 +18,7 @@
#include <mutex>
#include <thread>
#include "poly/threading.h"
#include "xenia/base/threading.h"
#include "xenia/ui/loop.h"
namespace xe {
@@ -40,7 +40,7 @@ class Win32Loop : public Loop {
std::thread thread_;
DWORD thread_id_;
poly::threading::Fence quit_fence_;
xe::threading::Fence quit_fence_;
};
} // namespace win32

View File

@@ -13,7 +13,7 @@
#include <tpcshrd.h>
#include <windowsx.h>
#include "xenia/logging.h"
#include "xenia/base/logging.h"
namespace xe {
namespace ui {

View File

@@ -12,7 +12,7 @@
#include <string>
#include "poly/delegate.h"
#include "xenia/base/delegate.h"
#include "xenia/ui/control.h"
#include "xenia/ui/ui_event.h"
@@ -46,10 +46,10 @@ class Window : public T {
}
public:
poly::Delegate<UIEvent> on_shown;
poly::Delegate<UIEvent> on_hidden;
poly::Delegate<UIEvent> on_closing;
poly::Delegate<UIEvent> on_closed;
Delegate<UIEvent> on_shown;
Delegate<UIEvent> on_hidden;
Delegate<UIEvent> on_closing;
Delegate<UIEvent> on_closed;
protected:
Window(const std::wstring& title) : T(0), title_(title) {}