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

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:        // イベントハンドラの接続を解除する
1.1.1.3 ! root       27:        static void Disconnect(UIMessage::ID id, wxEvtHandler *dest,
        !            28:                wxObjectEventFunction function);
1.1       root       29: 
                     30:        // UIMessage を処理する
                     31:        // (VM スレッドで実行される)
                     32:        static void Process(UIMessage::Queue& queue);
                     33: 
1.1.1.2   root       34:        // すべてのハンドラが解除されているかチェックする (開発用)
                     35:        static void AssertAllDisconnected();
                     36: 
1.1       root       37:  private:
1.1.1.3 ! root       38:        static std::array< std::vector<wxEvtHandler *>, UIMessage::ID_MAX>
        !            39:                dest_table;
1.1       root       40: };

unix.superglobalmegacorp.com

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