aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-12-04 12:10:04 +0100
committerDan Gudmundsson <[email protected]>2015-12-04 12:10:04 +0100
commit7a13283ac6f4a7738dbe2a2ccfce392a820dca2a (patch)
treec9c8735eef6ff80854c2814010f54b30f3d7f50d /lib/wx/api_gen
parent7b57b86a78f668747cc28e1820a0e6e8474111ea (diff)
parent80483dcb40c382e38405204370dfac7a8b6513aa (diff)
downloadotp-7a13283ac6f4a7738dbe2a2ccfce392a820dca2a.tar.gz
otp-7a13283ac6f4a7738dbe2a2ccfce392a820dca2a.tar.bz2
otp-7a13283ac6f4a7738dbe2a2ccfce392a820dca2a.zip
Merge branch 'dgud/wx/rewrite-cmd-loop/OTP-13160' into maint
* dgud/wx/rewrite-cmd-loop/OTP-13160: wx: Fix some function specifications wx: Remove call to disconnect_impl from server wx: Add a command queue check after event sent to erlang wx: Make wxPostScriptDC optional wx: Add wxOverlay wx: Use only one ring buffer for command queue
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r--lib/wx/api_gen/gl_gen_erl.erl12
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.c_src4
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl6
-rw-r--r--lib/wx/api_gen/wxapi.conf8
4 files changed, 26 insertions, 4 deletions
diff --git a/lib/wx/api_gen/gl_gen_erl.erl b/lib/wx/api_gen/gl_gen_erl.erl
index 20406a8d05..84e9600bc0 100644
--- a/lib/wx/api_gen/gl_gen_erl.erl
+++ b/lib/wx/api_gen/gl_gen_erl.erl
@@ -226,10 +226,14 @@ gen_types(Where) ->
w("-type clamp() :: float(). %% 0.0..1.0~n", []),
w("-type offset() :: non_neg_integer(). %% Offset in memory block~n", [])
end,
- w("-type matrix() :: {float(),float(),float(),float(),~n", []),
+ w("-type matrix12() :: {float(),float(),float(),float(),~n", []),
+ w(" float(),float(),float(),float(),~n", []),
+ w(" float(),float(),float(),float()}.~n", []),
+ w("-type matrix16() :: {float(),float(),float(),float(),~n", []),
w(" float(),float(),float(),float(),~n", []),
w(" float(),float(),float(),float(),~n", []),
w(" float(),float(),float(),float()}.~n", []),
+ w("-type matrix() :: matrix12() | matrix16().~n", []),
w("-type mem() :: binary() | tuple(). %% Memory block~n", []),
ok.
@@ -480,10 +484,12 @@ doc_arg_type2(T=#type{single=true}) ->
doc_arg_type3(T);
doc_arg_type2(T=#type{single=undefined}) ->
doc_arg_type3(T);
-doc_arg_type2(T=#type{single={tuple,undefined}}) ->
- "{" ++ doc_arg_type3(T) ++ "}";
+doc_arg_type2(_T=#type{single={tuple,undefined}}) ->
+ "tuple()";
doc_arg_type2(#type{base=float, single={tuple,16}}) ->
"matrix()";
+doc_arg_type2(#type{base=string, single=list}) ->
+ "iolist()";
doc_arg_type2(T=#type{single={tuple,Sz}}) ->
"{" ++ args(fun doc_arg_type3/1, ",", lists:duplicate(Sz,T)) ++ "}";
doc_arg_type2(T=#type{single=list}) ->
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src b/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
index 5e02066309..08fef1c2ff 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
@@ -42,11 +42,15 @@ case 101: { // wxEvtHandler::Disconnect
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
if(eventType > 0) {
+ if(recurse_level > 1) {
+ delayed_delete->Append(Ecmd.Save());
+ } else {
bool Result = This->Disconnect((int) *winid,(int) *lastId,eventType,
(wxObjectEventFunction)(wxEventFunction)
&wxeEvtListener::forward,
NULL, Listener);
rt.addBool(Result);
+ }
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 5649336b5d..ed7b27f3bf 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1141,6 +1141,7 @@ gen_macros() ->
w("#include <wx/html/htmlcell.h>~n"),
w("#include <wx/filename.h>~n"),
w("#include <wx/sysopt.h>~n"),
+ w("#include <wx/overlay.h>~n"),
w("~n~n", []),
w("#ifndef wxICON_DEFAULT_BITMAP_TYPE~n",[]),
@@ -1276,6 +1277,11 @@ encode_events(Evs) ->
w(" } else {~n"),
w(" send_res = rt.send();~n"),
w(" if(cb->skip) event->Skip();~n"),
+ w(" if(app->recurse_level < 1) {~n"),
+ w(" app->recurse_level++;~n"),
+ w(" app->dispatch_cmds();~n"),
+ w(" app->recurse_level--;~n"),
+ w(" }~n"),
w(" };~n"),
w(" return send_res;~n"),
w(" }~n").
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index f076323bea..eabbec3297 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -367,7 +367,7 @@
{class,wxMirrorDC, wxDC, [], ['wxMirrorDC', '~wxMirrorDC']}.
{class,wxScreenDC, wxDC, [], ['wxScreenDC', '~wxScreenDC']}.
-{class,wxPostScriptDC,wxDC,[],
+{class,wxPostScriptDC,wxDC,[{ifdef, wxUSE_POSTSCRIPT}],
['wxPostScriptDC','~wxPostScriptDC',
{'SetResolution', [{deprecated, "!wxCHECK_VERSION(2,9,0)"}]},
{'GetResolution', [{deprecated, "!wxCHECK_VERSION(2,9,0)"}]}]}.
@@ -1975,3 +1975,9 @@
{class, wxMouseCaptureLostEvent, wxEvent,
[{event,[wxEVT_MOUSE_CAPTURE_LOST]}],[]}.
+
+{class, wxOverlay, root, [],
+ ['wxOverlay', '~wxOverlay', 'Reset']}.
+
+{class, wxDCOverlay, root, [],
+ ['wxDCOverlay', '~wxDCOverlay', 'Clear']}.