aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wxapi.conf
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2010-10-06 14:05:36 +0200
committerDan Gudmundsson <[email protected]>2010-11-15 10:13:05 +0100
commita9f305c51ebccefc3ce6725b4f90700a7d250287 (patch)
tree64f522982e763eb5eda411196413a15704db36c4 /lib/wx/api_gen/wxapi.conf
parentb48be79573171e530d97cdf078488eb66fc23f30 (diff)
downloadotp-a9f305c51ebccefc3ce6725b4f90700a7d250287.tar.gz
otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.tar.bz2
otp-a9f305c51ebccefc3ce6725b4f90700a7d250287.zip
Split opengl functionality into separate dynamic library
The idea is to build a separate opengl library which can be reused by other erlang applications.
Diffstat (limited to 'lib/wx/api_gen/wxapi.conf')
-rw-r--r--lib/wx/api_gen/wxapi.conf49
1 files changed, 25 insertions, 24 deletions
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index 6bafda5b9d..14f5f7e267 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -505,15 +505,15 @@
{"data",[in,{base,binary}]},
{"alpha",[in,{base,binary}]},
{{4,pre_hook},
- "if(!static_data) {"
- "data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
- "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"},
+ {c, "if(!static_data) {"
+ "data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
+ "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}},
{{5,pre_hook},
- "if(!static_data) {"
- " data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
- " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);"
- " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);"
- " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}
+ {c, "if(!static_data) {"
+ " data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
+ " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);"
+ " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);"
+ " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}}
]},
'~wxImage',%'AddHandler',
'Blur','BlurHorizontal','BlurVertical',
@@ -524,15 +524,15 @@
{"data",[in,{base,binary}]},
{"alpha",[in,{base,binary}]},
{{4,pre_hook},
- "if(!static_data) {"
- "data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
- "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"},
+ {c, "if(!static_data) {"
+ "data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
+ "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}},
{{5,pre_hook},
- "if(!static_data) {"
- " data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
- " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);"
- " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);"
- " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}
+ {c, "if(!static_data) {"
+ " data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
+ " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);"
+ " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);"
+ " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}}
]},
'Destroy','FindFirstUnusedColour', % 'FindHandler',
'GetImageExtWildcard',
@@ -551,15 +551,15 @@
'Rotate90','SaveFile','Scale','Size',
{'SetAlpha', [{{2,"alpha"},[in,{base,binary}, {def, none}]},
{{2,pre_hook},
- "if(!static_data) {"
- "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);"
- "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}
+ {c, "if(!static_data) {"
+ "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);"
+ "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}
]},
{'SetData', [{"data",[in,{base,binary}]},
{pre_hook,
- "if(!static_data) {"
- "data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
- "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}
+ {c, "if(!static_data) {"
+ "data = (unsigned char *) malloc(Ecmd.bin[0]->size);"
+ "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}
]},
'SetMask','SetMaskColour','SetMaskFromImage','SetOption',
'SetPalette',
@@ -1146,9 +1146,10 @@
{class, wxGLCanvas, wxWindow,
[{skip, [{'SetCurrent', 2}]}], %% NA MAC
- [{'wxGLCanvas', [{"attribList", [in, {single,array}]}]},
+ [{'wxGLCanvas', [{"attribList", [in, {single,array}]},
+ {pre_hook, {erl, "wxe_master:init_opengl(),"}}]},
'GetContext',
- {'SetCurrent', [{post_hook,"if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}]},
+ {'SetCurrent', [{post_hook,{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}}]},
%%{'SetColour', [{"colour", [in, {single,array}]}]},
'SwapBuffers']}.