Merge branch 'webview-js-retval'

Integrate GSoC 2017 work by Jose Lorenzo on allowing returning values
from JavaScript code via wxWebView::RunScript().
This commit is contained in:
Vadim Zeitlin 2017-11-04 14:33:42 +01:00
commit 7e0b6d4d81
15 changed files with 931 additions and 49 deletions

View file

@ -100,13 +100,13 @@ public:
#define WX_ASSERT_FAILS_WITH_ASSERT(cond)
#endif
#define WX_ASSERT_EVENT_OCCURS(eventcounter, count) \
#define WX_ASSERT_EVENT_OCCURS_IN(eventcounter, count, ms) \
{\
wxStopWatch sw; \
wxEventLoopBase* loop = wxEventLoopBase::GetActive(); \
while(eventcounter.GetCount() < count) \
{ \
if(sw.Time() < 100) \
if(sw.Time() < ms) \
loop->Dispatch(); \
else \
{ \
@ -119,6 +119,8 @@ public:
eventcounter.Clear(); \
}
#define WX_ASSERT_EVENT_OCCURS(eventcounter,count) WX_ASSERT_EVENT_OCCURS_IN(eventcounter, count, 100)
// these functions can be used to hook into wxApp event processing and are
// currently used by the events propagation test
class WXDLLIMPEXP_FWD_BASE wxEvent;