aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen_cpp.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2018-04-04 13:08:33 +0200
committerDan Gudmundsson <[email protected]>2018-04-04 13:08:33 +0200
commitcb7a9a70e9c04b972906013fd44dac86ec0b442e (patch)
treee79f2d286212e3359f5cb489874bb9d655c962d0 /lib/wx/api_gen/wx_gen_cpp.erl
parentf99860259ee557851acc865519a315f04d1d4d51 (diff)
downloadotp-cb7a9a70e9c04b972906013fd44dac86ec0b442e.tar.gz
otp-cb7a9a70e9c04b972906013fd44dac86ec0b442e.tar.bz2
otp-cb7a9a70e9c04b972906013fd44dac86ec0b442e.zip
Add new "constants" to wxGLCanvas
They can't be constants because the order differ between 3.0.3 and 3.1. So they must be looked up in runtime.
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 573abfa9b8..cc4e1b5301 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1127,6 +1127,15 @@ build_gvar({Name, {address,Class}, _Id}, Cnt) ->
w(" rt.addAtom(\"~s\"); rt.addRef(getRef((void *)&~s,memenv), \"~s\");~n",[Name,Name,Class]),
w(" rt.addTupleCount(2);~n"),
Cnt+1;
+build_gvar({Name, {test_if,Test}, _Id}, Cnt) ->
+ w("#if ~s~n", [Test]),
+ w(" rt.addAtom(\"~s\"); rt.addInt(~s);~n", [Name, Name]),
+ w(" rt.addTupleCount(2);~n"),
+ w("#else~n", []),
+ w(" rt.addAtom(\"~s\"); rt.addAtom(\"undefined\");~n", [Name]),
+ w(" rt.addTupleCount(2);~n"),
+ w("#endif~n", []),
+ Cnt+1;
build_gvar({Name, Class, _Id}, Cnt) ->
w(" rt.addAtom(\"~s\"); rt.addRef(getRef((void *)~s,memenv),\"~s\");~n",[Name,Name,Class]),
w(" rt.addTupleCount(2);~n"),