summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Main.h
blob: 80c6f6db50db9bf8da9ab72aa1e6ca12badf8e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.

#pragma once

#include <wx/app.h>
#include <wx/chartype.h>
#include <wx/defs.h>
#include <wx/event.h>
#include <wx/string.h>

class CFrame;
class wxLocale;
class wxTimer;
class wxTimerEvent;

// Define a new application
class DolphinApp : public wxApp
{
public:
	CFrame* GetCFrame();

private:
	bool OnInit() override;
	int OnExit() override;
	void OnFatalException() override;
	bool Initialize(int& c, wxChar **v) override;
	void InitLanguageSupport();
	void MacOpenFile(const wxString &fileName);

	DECLARE_EVENT_TABLE()

	wxTimer *m_afterinit;
	bool BatchMode;
	bool LoadFile;
	bool playMovie;
	wxString FileToLoad;
	wxString movieFile;
	wxLocale *m_locale;

	void AfterInit(wxTimerEvent& WXUNUSED(event));
	void OnEndSession(wxCloseEvent& event);
};

DECLARE_APP(DolphinApp);