main.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #define UNICODE
  2. #define QT_NO_DEBUG
  3. #define QT_CORE_LIB
  4. #define QT_GUI_LIB
  5. #define QT_THREAD_SUPPORT
  6. #include <QApplication>
  7. #include <QtGui>
  8. //Q_IMPORT_PLUGIN(QJpegPlugin)
  9. //Q_IMPORT_PLUGIN(QMngPlugin)
  10. #include <../base.hpp>
  11. #include <../cart/cart.hpp>
  12. #include <nall/config.hpp>
  13. #include <nall/function.hpp>
  14. #include <nall/input.hpp>
  15. using namespace nall;
  16. #include <ruby/ruby.hpp>
  17. using namespace ruby;
  18. #include <libfilter/libfilter.hpp>
  19. #include "input/input.hpp"
  20. #include "utility/utility.hpp"
  21. class Application {
  22. public:
  23. class App : public QApplication {
  24. public:
  25. #ifdef _WIN32
  26. bool winEventFilter(MSG *msg, long *result);
  27. #endif
  28. App(int argc, char **argv) : QApplication(argc, argv) {}
  29. } *app;
  30. bool terminate; //set to true to terminate main() loop and exit emulator
  31. bool power;
  32. bool pause;
  33. bool autopause;
  34. string configFilename;
  35. string styleSheetFilename;
  36. int main(int argc, char **argv);
  37. void processEvents();
  38. void locateFile(string &filename, bool createDataDirectory = false);
  39. void initPaths(const char *basename);
  40. void init();
  41. Application();
  42. ~Application();
  43. } application;
  44. struct Style {
  45. enum {
  46. WindowMargin = 5,
  47. WidgetSpacing = 5,
  48. SeparatorSpacing = 5,
  49. };
  50. };