diff options
author | Dan Gudmundsson <[email protected]> | 2013-12-02 09:51:11 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-12-02 09:51:11 +0100 |
commit | d3e5761436cfbcb5b53edad9e1140e445ce94bfd (patch) | |
tree | 71a4fa03858907b43f68c06a733b0f28bce63d51 /lib/wx/c_src/wxe_events.h | |
parent | 0201ed20979a8828c2e989552684c09f320d0126 (diff) | |
parent | 76a1a59d320f3b48c86fe82c6d47c6bfa232196b (diff) | |
download | otp-d3e5761436cfbcb5b53edad9e1140e445ce94bfd.tar.gz otp-d3e5761436cfbcb5b53edad9e1140e445ce94bfd.tar.bz2 otp-d3e5761436cfbcb5b53edad9e1140e445ce94bfd.zip |
Merge branch 'dgud/wx/fix-wx-init-macosx/OTP-11393' into maint
* dgud/wx/fix-wx-init-macosx/OTP-11393:
wx: Fix initialization
wx: Fix compiler options for xcode 5.0
wx: Update documentation links to wxWidgets
wx: wxListBox::Set crashes on wxWidgets 3.0 with NULL argument
wx: Fix crash in wxe_server cleanup
wx: Fix looping debug printout
wx: Fix compilation on old macs
wx: Fix compiler warnings
wx: Fix cleanup of event handlers
wx: Enable configure flags --with-wxdir --with-wx-prefix on windows
wx: Fix initializations on mac osx
Diffstat (limited to 'lib/wx/c_src/wxe_events.h')
-rw-r--r-- | lib/wx/c_src/wxe_events.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lib/wx/c_src/wxe_events.h b/lib/wx/c_src/wxe_events.h index 6bbb0dfa13..718e0ad120 100644 --- a/lib/wx/c_src/wxe_events.h +++ b/lib/wx/c_src/wxe_events.h @@ -30,6 +30,20 @@ public: int cID; }; +/* One EvtListener per listening erlang process */ +/* If callbacks are used the receiver is wxe_master process */ +/* and a wxeEvtListener pre callback is registered */ +class wxeEvtListener : public wxEvtHandler +{ + public: + wxeEvtListener(ErlDrvTermData Thisport) : port(Thisport) + {} + // {fprintf(stderr, "Creating %x\r\n", (unsigned int) this); fflush(stderr);} + ~wxeEvtListener() {} + void forward(wxEvent& event); + ErlDrvTermData port; +}; + void initEventTable(); int wxeEventTypeFromAtom(char *etype_atom); @@ -37,32 +51,17 @@ int wxeEventTypeFromAtom(char *etype_atom); class wxeCallbackData : public wxObject { public: - wxeCallbackData(ErlDrvTermData caller, void *req, char *req_type, - int funcb, int skip_ev, wxeErlTerm * userData); + wxeCallbackData(ErlDrvTermData caller, int req, char *req_type, + int funcb, int skip_ev, wxeErlTerm * userData, + wxeEvtListener *handler_cb); ~wxeCallbackData(); + wxeEvtListener * handler; ErlDrvTermData listener; int fun_id; - void * obj; + int obj; char class_name[40]; int skip; wxeErlTerm * user_data; }; -/* One EvtListener per listening erlang process */ -/* If callbacks are used the receiver is wxe_master process */ -/* and a wxeEvtListener pre callback is registered */ -class wxeEvtListener : public wxEvtHandler -{ -public: - wxeEvtListener(ErlDrvTermData Thisport) : port(Thisport) - {} - // {fprintf(stderr, "Creating %x\r\n", (unsigned int) this); fflush(stderr);} - void forward(wxEvent& event); - ~wxeEvtListener() { - ((WxeApp *)wxTheApp)->clearPtr(this); - // fprintf(stderr, "Deleteing %x\r\n", (unsigned int) this); fflush(stderr); - }; - ErlDrvTermData port; -}; - #endif |