|
|
1.1 ! root 1: // ! 2: // nono ! 3: // Copyright (C) 2021 nono project ! 4: // Licensed under nono-license.txt ! 5: // ! 6: ! 7: #pragma once ! 8: ! 9: #include "wxnono.h" ! 10: #include "uimessage.h" ! 11: #include <array> ! 12: ! 13: wxDECLARE_EVENT(NONO_EVT_UIMESSAGE, wxCommandEvent); ! 14: ! 15: class WXUIMessage ! 16: { ! 17: public: ! 18: // VM からの UIMessage を wxWidgets のイベントハンドラに接続する ! 19: static void Connect(UIMessage::ID id, wxEvtHandler *dest, ! 20: wxObjectEventFunction function); ! 21: ! 22: // イベントハンドラの接続を解除する ! 23: static void Disconnect(UIMessage::ID id, wxObjectEventFunction function); ! 24: ! 25: // UIMessage を処理する ! 26: // (VM スレッドで実行される) ! 27: static void Process(UIMessage::Queue& queue); ! 28: ! 29: private: ! 30: static std::array<wxEvtHandler *, UIMessage::ID_MAX> dest_table; ! 31: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.