wxwidgets: GUI for memory search
[lsnes.git] / include / plat-wxwidgets / platform.hpp
blob2e9cd7d59b7068c412fb48e640e7c7ebf1f4f73e
1 #ifndef _plat_wxwidgets__platform__hpp__included__
2 #define _plat_wxwidgets__platform__hpp__included__
4 #include "core/moviefile.hpp"
5 #include "core/window.hpp"
7 #include <cstdlib>
8 #include <cstdint>
9 #include <cstddef>
11 #include <wx/string.h>
13 class wxwin_mainwindow;
14 class wxwin_messages;
15 class wxwin_status;
16 class wxWindow;
17 class wxKeyEvent;
19 wxString towxstring(const std::string& str) throw(std::bad_alloc);
20 std::string tostdstring(const wxString& str) throw(std::bad_alloc);
21 void bring_app_foreground();
22 std::string pick_archive_member(wxWindow* parent, const std::string& filename) throw(std::bad_alloc);
23 void boot_emulator(loaded_rom& rom, moviefile& movie);
24 void handle_wx_keyboard(wxKeyEvent& e, bool polarity);
25 void initialize_wx_keyboard();
26 void signal_program_exit();
27 void _runuifun_async(void (*fn)(void*), void* arg);
29 //Editor dialogs.
30 void wxeditor_axes_display(wxWindow* parent);
31 void wxeditor_authors_display(wxWindow* parent);
32 void wxeditor_settings_display(wxWindow* parent);
34 //Auxillary windows.
35 void wxwindow_memorysearch_display();
37 template<typename T>
38 void functor_call_helper2(void* args)
40 (*reinterpret_cast<T*>(args))();
41 delete reinterpret_cast<T*>(args);
44 template<typename T>
45 void runuifun(T fn)
47 _runuifun_async(functor_call_helper<T>, new T(fn));
50 //Some important windows (if open).
51 extern wxwin_messages* msg_window;
52 extern wxwin_status* status_window;
53 extern wxwin_mainwindow* main_window;
56 #endif