Annotation of nono/wx/wxuimessage.h, revision 1.1.1.2

1.1       root        1: //
                      2: // nono
                      3: // Copyright (C) 2021 nono project
                      4: // Licensed under nono-license.txt
                      5: //
                      6: 
1.1.1.2 ! root        7: //
        !             8: // UI スレッドへのメッセージ機構 (GUI 側)
        !             9: //
        !            10: 
1.1       root       11: #pragma once
                     12: 
                     13: #include "wxnono.h"
                     14: #include "uimessage.h"
                     15: #include <array>
                     16: 
                     17: wxDECLARE_EVENT(NONO_EVT_UIMESSAGE, wxCommandEvent);
                     18: 
                     19: class WXUIMessage
                     20: {
                     21:  public:
                     22:        // VM からの UIMessage を wxWidgets のイベントハンドラに接続する
                     23:        static void Connect(UIMessage::ID id, wxEvtHandler *dest,
                     24:                wxObjectEventFunction function);
                     25: 
                     26:        // イベントハンドラの接続を解除する
                     27:        static void Disconnect(UIMessage::ID id, wxObjectEventFunction function);
                     28: 
                     29:        // UIMessage を処理する
                     30:        // (VM スレッドで実行される)
                     31:        static void Process(UIMessage::Queue& queue);
                     32: 
1.1.1.2 ! root       33:        // すべてのハンドラが解除されているかチェックする (開発用)
        !            34:        static void AssertAllDisconnected();
        !            35: 
1.1       root       36:  private:
                     37:        static std::array<wxEvtHandler *, UIMessage::ID_MAX> dest_table;
                     38: };

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.